I don't really know what I did because I was trying to work out how to mount a horse but after a while I noticed that I had no bars, when I dismounted my hunger and health bars came back, but xp was still gone. I gave myself XP and now hunger and health are gone however XP is back if I dismount. I think this has to do with switching to game mode 1 and back to 0.
Linked issues
is duplicated by 8
3 more links
Confirmed. Happens to me too. My XP bar is gone after riding a horse! Reloading the world or even restarting the game doesn't fix the problem.