@casino You may try to see if the same happens on a different device. If the problem is in Google or the router, then you’ll see the same behavior on the second device at exactly the same time.
Another thing you may try is to run the command ‘nslookup www.google.com’ at the time when Safe search is on and off, and compare the results.