How to ask Capacitor to use native API to change WebView location

I’ve noticed that window.location.href = newLocation; does not work reliably. Every second deployment from XCode to my iPhone doesn’t do anything on that line. Every other deployment navigates successfully.

Can I communicate with Capacitor to ask it to do the redirection instead?