This letter proposes an architecture for an antenna-in-package (AiP) operating at sub-terahertz (sub-THz) frequencies to improve the isolation between two ports in a dual-polarized stacked patch antenna. The design features two orthogonal fan-out lines that extend from a vertical via for probe feeding, each covered by a grounded shielding geometry. The proposed structure improves the isolation of a single element by up to 10 dB between two ports for each polarization. The performance of the proposed design was verified through simulated and measured results using a 4 × 1 subarray. The <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">S</i> <sub xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">21</sub> value of the proposed 4 × 1 subarray is −20 dB at a center frequency of 145 GHz, and the measured <italic xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">S</i> <sub xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">11</sub> bandwidth is more than 10 GHz with a return loss of 10 dB. The measured gain within the bandwidth is higher than 9 dBi. The proposed architecture can improve the isolation and performance of sub-THz AiPs, making them viable for use in large arrays.