TheFriendlyCrow I think the OP is referring to the fact that Android requires the user to enter the device credentials after X amount of time. So the user has no choice but to do this.
Speeduser7533 The problem is, there's no way to tell when a password unlock is going to be forced on you.
If what you are describing is caused by Android requiring the device credentials after a set amount of time, regardless of what you're doing, then there is a way to know. According to this AOSP documentation the time before "fallback to primary authentication (such as PIN, pattern, or password)" is based on which "biometric class" the device's biometric implementation satisfies. Based on what is written in the "Constraints" column in the table on that site, I assume that modern Pixels satisfy biometric class 3. Which gives the following constraint: "Up to 72 hours before fallback to primary authentication (such as PIN, pattern, or password)".
So, if I'm correct, then the device prompts you for the password either after 72 hours of uptime, or 72 hours since the last time you unlocked the phone with the password. So a solution seems to be to manually reboot the phone before 72 hours has passed, and when booted up again, unlock it when no one is looking at your screen.