It is possible for a player to wear a Jack o' Lantern in their head slot in the same way as you can with a Carved Pumpkin.
This behaviour was not present in 1.19.3, and seems to have begun happening in 1.19.4 without any mention in any changelogs. Not even the wiki knows about it.
To reproduce:
1) Create a new world in gamemode survival, creative or adventure, then obtain a Jack o Lantern.
2) Shift-click the Jack o Lantern in your inventory. This will cause it to go into your head slot. It can also be clicked to pick up and then placed into the head slot.
Thank you for your report!
We're tracking this issue in MC-261294, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki