GPS SPS does not apply to cellphones or to any other receivers, it only applies to the signal in space (SIS) that is broadcast by GPS satellites. So the 4m accuracy does not mean that the user position will have that accuracy, since the US government does not impose any restriction to end users. What it means is that the satellites will send information such that their pseudorange has an accuracy of at least 4m rms (or 7.8m 95% of the time under certain conditions) excluding ionosopheric errors, multipath, etc. From https://www.gps.gov/systems/gps/performance/accuracy/:
The accuracy commitments do not apply to GPS devices, but rather to the signals transmitted in space. For example, the government commits to broadcasting the GPS signal in space with a global average user range error (URE) of ≤7.8 m (25.6 ft.), with 95% probability. Actual performance exceeds the specification. On May 11, 2016, the global average URE was ≤0.715 m (2.3 ft.), 95% of the time.
To be clear, URE is not user accuracy. User accuracy depends on a combination of satellite geometry, URE, and local factors such as signal blockage, atmospheric conditions, and receiver design features/quality.
Nevertheless, Appendix B from the SPS contains an interesting discussion on how to calculate accuracy at user level.