AFAIK McDonalds here provide free WiFi service that disconnects every 45 minutes. And the Free WiFi provided by my ISP requires me to access the logon portal very 1 hour or the connection will be gone. (Suspected it's to push people using quota from their data plan)

You should check whether your WiFi disconnects periodically at Home/Work too. If not, I suspect it's only the hotspot's policy.

You should be able to find "Condition of Free WiFi Service" like notice near the hotspot.