Keep Getting Login Attempt Failed

Seem like every time I go back to the app or Chrome tab after I haven’t used it for a little while it pops up with a login attempt failed. Everything works normal and the page refreshes like it should.

Its almost like the app is still loaded into RAM on the phone but the app itself has cut the connection to hy HA installation then When I go back to it it has to reconnect and something breaks, but retries and works fine? Same exact situation with the Chrome tab.

I know I could just close the tab or force close the app to start from scratch every time but I have 12gig of ram on my phone and apps sit there for quite a while before being closed automatically if I forget.

Home assistant drops connections that are inactive after a certain time. It was to prevent this sort of thing happening but it has just made it worse: