I found out how to recreate it, if you use the /kill command in flight, I respawned and I was stuck in the elytra position.
I'm not quite sure how to recreate it, but I died by running into a wall and when I respawned I was in the elytra position. It has only happened once though. I tried dying the same way and it didn't work.
I found out how to recreate it, if you use the /kill command in flight, I respawned and I was stuck in the elytra position.