Circuit for selecting between PCB antenna and external
why the first UFL? that connector will bring in more inconsistencies than you'll fix by being able to measure at that point.
Also, I don't know your 2.4 GHz transmitter (IC, I guess), but that thing usually needs matching of its own.
So, in my world, this would look more like

2.4 GHz interface of IC
matching circuit for 50Ω transmission line impedance
50 Ω microstrip line up to 0 Ω &quot;selector&quot;

on one side of that, line, matching, and chip/PCB antenna
on the other, line, and RF connector



In manufacturing, often having different population options comes at a cost. Check whether a simple RF switch IC isn't the better option financially at the quantity of boards you'll produce, overall, and control that through a GPIO and some firmware on a microcontroller you probably have in your system, anyways, for example.