At a top level I would hazard to say there are probably two aspects to the spatial characteristics and imaging of a headphone. One is how well does the device convey the interaural timing and intensity differences (FR related), and secondly how does it interact with the pinnae (driver and cup design). An interesting demo I found on YT actually demonstrates the differences between different headphones and speakers nicely. Its a binaural panning demo in dearVR found here:
dearVR Pro 3 Dimensional Mixing Demo and at one point he moves the image of a recorded guitar soloist, in his words, "a little to the left." Repeating an earlier experiment of how it sounds on my various devices is interesting, to say the least. On my 2020 Sundara's, which have the best spatial effects of all my headphones with EQ, the image is slightly behind me as with most headphones. On those, it moves a little to the left like he says. On my FiiO FD5's, the image is narrower, so it appears to move a little to the left a bit less. On my 560S's, uh... It moves to the left, but appears to do so by rotating over the top of my head. A very unusual and somewhat off-putting result. Only on my nearfield speaker system does it actually appear to move with the dot, which is quite a bit to the left, by about 40-45 degrees or so (42 degrees in the mixing software, to be exact). Closing my eyes and moving my arm with the image shows a similar angle to the little dot on the "radar" screen when I open my eyes and look afterwards.
Every device gives a completely different result, and also a completely different soundstage. The speakers are, by far, the most accurate with respect to imaging since they are close, in a fairly dead space acoustically, and can interact with my ears as sound would normally. But by far the most open sounding device is the 2020 Sundaras on the Harman curve. The caveat is the increased bass, which they need to sound balanced, causes excessive excursion and a temporary loss of tension in the membranes (and consequently them doing really unpleasant things), but fortunately they do recover after a while. And one thing I can say is, that for me at least, its like they aren't even there they are so incredibly open listening to them again. Its really quite remarkable compared to the others which sound more closed in. But the bottom line is each device, despite being more or less compliant with the most current FR curves from research, have completely different imaging. Clearly its an aspect of headphones that is, perhaps, not getting the true attention it deserves. And it has a big impact on how they are perceived. As I would suspect, a lot of this probably derives from how they interact with my head and ears, and how that relates the ITDs and IIDs in the source recordings and my own HRTFs (if any at all with things like IEMs), which will obviously vary by individual.
Edit: Replaced video with simpler link instead.