You are not alone in the phantom trunk opening and I the same situation with my 2020 Elantra Limited and my 2024 Elantra which I replied to other Elantra Forum members a few years ago so to recap: I also had the trunk issue with my Sonata Ltd only that one the auto trunk didn't work at all. The car was under warranty and the dealer replaced the receiving unit located in the trunk above the rear bumper so I would recommend go to your Hyundai dealership to have that unit checked out. The second thing I would do which I have done on the 2024 and also did on the 2020 is to go on Amazon and order the silicone key fob protector, I got 2 for about $10.00. they are model and button specific so make sure you order the right one. They can be a little hard to put on but when its on, you'd swear it was a fob from the factory. The biggest difference is that the added silicone cover makes pushing the buttons a bit harder which really pays off when you have the fob in a pocket with other things, the cover prevents the buttons to be activated when you might lean against something or the fob rubs against the keys attached to it or change in the pocket. I can verify before the cover was put on and the key fob was hanging on a hook in the kitchen, the trunk opened on its own and after the cover went on, phantom trunk openings stopped.
It may be worth a few dollars to try the silicone covers but again, have that receiver checked out. Disclaimer: while the covers have worked for me, they may or may not work for you. Other Hyundai owners have had good luck with them.
Best of luck in solving your issue, (pray that it is not the Soy based wiring insulation)
cbcristy59