VPN app keeps disconnecting

I have set “Always on” in my VPN settings (I am using PureVPN) and I have set battery usage to “Unrestricted” for the app. Also, I only use Wifi, without automatic switching to using data.
But the VPN app that I am using keeps disconnecting during the day.

Is it a general problem with Android (trying to preserve resourses?) or is it the app’s problem?
What can be done to prevent it from happening?

It is caused by both, your other apps wanting resources along with Android not honoring the intent that the VPN app shouldn’t be paused or stopped, and the VPN app probably isn’t using all the techniques needed to avoid being paused/stopped (i.e., those settings aren’t sufficient).

I can’t help with any fixes, but I can sympathise with your situation.

Been there, done that with the Adguard VPN, always used to disconnect, I had to keep checking and manually re-starting.

Like you, I’d set everything a user is advised too and it still kept dropping the connection.

My best advise is to contact the Apps support address and see what they can advise.

Hope you get it resolved.

Proton VPN works well for me it stays on without any issues