the automatic QR login supported by the app has some security restrictions to make it more secure, like being in the same network like you commented or having a short expiration time.
AFAIK you can create some "permanent" QR codes manually, I think it should work. If you check the Moodle App Deep Linking guide you will see that you can define some URLs to launch the app. If you include the user token in the URL, the app will use it to automatically authenticate the user.
If a student has already used the app to authenticate he will have a token, you can get it from the Moodle database (table external_tokens). Please notice these tokens expire. You can also create a token manually for each student by going to Site administration > Server > Manage tokens. In there you can specify if you want this token to expire or not (and when).
In the Deep linking guide linked above you'll see that the URL can also include a "privatetoken" parameter. This private token is used to automatically authenticate the student when he opens the browser from the app, so I recommend you to include it too. AFAIK the only way to obtain the privatetoken is to look it at the Moodle database, in the external_tokens table, column privatetoken.
So basically you will need to define a URL like this:
Then you can convert that URL to a QR code and let your students use it.