I have an issue of my HP 15-ay going to airplane mode every time I open the lid. I have disabled the computer from going to sleep in Gnome Tweak Tools.
Cursory search did produce this result.
If you would try it, you should use New Recommended Systemd Method.
I haven’t had this issue, I haven’t verified the solution, and solution’s author provides no real explanation why his solutions works, but several people with hp laptops have confirmed it works.
Also it looks harmless enough to try and very easy to reverse, so I would definitely test it. And if you do so – report the results here, please)
look at this file
For any folks visiting this after Googling - following the linked advice worked for me in the past on my HP Pavilion 15 Gaming Laptop on Pop!_OS (Ubuntu-based), and after finding it linked here as well, it worked for me on Fedora 36 - thanks to @nightromantic for suggesting the link here!
Thank you @johnandmegh for verifying that the fix from 3 years back still works.