How to disable auto restart on iOS 18

I have an iPhone 12 mini and I am currently using it as a modem for my router. Previously it was running iOS 14, but the DHCP on iOS 14 doesn't work and Apple didn't fix it until iOS 15. Recently I upgraded the system to iOS 18.4 to get DHCP back, but I got a bigger problem. The iPhone will restart itself after 3 days, and then I just lost internet connection. The hotspot will not be turned on until I climbed on my bookshelf to unlock my phone.

After I googled it, I found that it is a feature that Apple introduced in iOS 18.1. While I couldn't find any setting to turn it off. If this cannot be controlled by the user, then it is anyway a BUG than a feature.

How to disable auto restart on iOS 18
 
 
Q