The fixed glass roofs that most clean-sheet EVs tend to have add some headroom.
But they make terrible storm chasing cars. Hail is too prevalent where I live to have a glass roof. I take a risk having a moonroof that opens, but in that case, I'm trading the delight of driving with all of the windows open, with the risk of having to replace the moonroof.