Even if you are on modern 5G network, and set your phone to never connect to 2G/3G network, your location is still compromised because the overall network is still backward compatible to support someone who might be trying to reach you from a 2G or 3G network which run on the insecure SS7 protocol. This enables protocol downgrade attacks. Only way to insulate yourself from this while still being on mobile networks is to use a "data-only" sim and stick to purely Internet based secure messaging and calling apps and not use the phone number for anything.
The way mobile radio/phone networks have evolved (trusted walled garden with backward compatibility) vs Internet has evolved (untrusted with end to end security) is in stark contrast to each other.
Super interesting stuff, got reading on this?