The test flights of Trident used GPS to monitor the missile's operation, not to control it in flight. It's kind of obvious, really, it wouldn't be a test of the inertial guidance system, a key component of the missile if they relied on GPS just for the test flights and just hoped the INU worked if, God forbid, it was ever used in anger.
There have been over 150 test flights of Trident D5 missiles over the years, nearly all have flown successfully. A few have failed, not a surprise there.
There's a lot of other military kit in use by British forces that does use GPS and we have access to the encrypted high-accuracy GPS data for that purpose as part of NATO. We can, of course, be locked out of that access if the US so chooses. They have changed their minds on this before and they control the system with no-one else allowed input. Galileo is a civilian global positioning system with military applications as a secondary benefit so access to the encrypted high-accuracy data it provides can be purchased for use for things like autolanding airliners and harbour manoeuvering of ferries etc.
What we're losing by leaving the EU is a place at the table deciding how Galileo is developed in the future and contracts to build the secure parts for it and we're no longer on the preferred supplier list for things like satellite components and integration since it's an EU project and EU-based companies will have first dibs rather than, say, SSTL.