How to connect to WIFI but use phone mobile internet?
There should be an option called Smart network switch which switches to mobile data connection whenever the WiFi connectivity is limited or unstable.

The screenshot below is from Samsung Galaxy.