I remember that on my son’s Samsung S7 he also experienced something similar: it worked for some time and then stopped. Once changing the network it worked again for some time.
If I recall correctly then it had been solved by disabling all kind of optimizations - Samsung is known to do aggresive optimizations on apps.