Headphones with a proper HRTF preserve that perfectly fine better than any actual speaker setup ever can. The typical demo for this functionality is https://www.youtube.com/watch?v=IUDTlvagjJA
It's possible to do this in a way that's not in any way distinguishable from a real 5.0 setup
Dolby provides a similar system, but with a generic room simulation, as do several others.