I had the same problem with losing WIFI and VPN when the phone goes into lock screen.
I found an own "solution":
- Download a silent mp3 file on the internet
- install switch (mp3 convert program) and convert the mp3 to the lowest bitrate possible> 8kbs / 11Khz.
- place mp3 on USB stick and put this into your Router, Nas or Iconnect.
- when connected to VPN with iphone / Ipad> play the mp3 file from the stick bij using any program like remote file / file explorer
- the result is:
1. you dont here any sound of the mp3
2. you will hear every whatsapp sound or sms etc
3. Because of the low bitrate it uses very low data
4. your vpn stays connected when the phone goes into lock
This works perfect for me and i hope it will help you.