Seriously annoyed that I have to do this. But I have to do this.
Each new Android version is worse than the version before it to my taste. Try this on for size...
I don't bother asking this kind of question on the internet as I know from experience that very few people would catch on to what the question is actually asking for. I am going to pose it as concisely as possible here, and then I am going to answer with my own solution.
Very simply in Android 9 there is a component part of the operating system called 'Network Manager'. One of the things the network manager does in addition to connecting to a network; using probably typical TCP/IP network stuff. It also returns a visual prompt to the user indicating whether the 'network manager' logic finds what it calls an 'internet connection'.
One of the problems with the implementation in version 9 is that it returns a Boolean true/false value which sets a variable that other software running on the device uses to determine if an 'internet connection' exists.
The way Android 9 Network Manager accomplishes the job is so sinfully flakey and amaturish I am compelled to bring it to light; for myself if for no one else.
But before I proceed with describing the answer, here is the question: How does the Android 9 Network Manager identify whether an internet connection exists or not?
Picture shows clue of stuff that breaks Android OS.