DIY 2.4 ghz antenna for Bluetooth Speaker too cut or not to cut
Those measurements are for wire elements in free air; not with the insulation still covering the wire. The value of the insulation will affect the surface electrical speed of the wire, and thus change the length you'd need (easiest fix is to cut the insulation back).

The length of wire that is passing through the box, with the shield cut off must be counted towards your antenna's effective length.

The exposed few mm of trace &amp; the exposed length of coax center conductor you soldered to it should be electrically shielded to minimize interference (both caused by the antenna &amp; interfering with it).

For a quite effective, cut-coax antenna with better reception (2-3 dBi gain), look up a "Bazooka" Dipole Antenna. It's quite easy to make (I've personally made more than a dozen of them, for various bands) &amp; has decent performance without being too "fiddly" when it comes to getting the measurements exactly perfect.