Browser or native doesn't matter, both have this issue. Heck, this is Google's own software that gets killed: the utility that submits the string to it is still there when I unlock the screen. It's probably just me but I really miss the Android 4 which I had customised to death so it would only run the things I wanted (no bloat): the battery still lasts weeks (the device is >10 years old!) if you don't ask it to do anything because nothing runs in the background. However, when I choose to run an app and don't turn it off before locking the screen, it'd just keep running
But yea, that wouldn't work for the general public