Is there a way to add an "incorrect password" error message on password protected pages?

I've looked everywhere and the closest thing I can find is from here: [Add error message on password protected page](https://wordpress.stackexchange.com/questions/71284/add-error-message-on-password-protected-page)

The problem is that the error persists even when you navigate away from the page because it's based on cookies.

Something that seemed so simple is taking me hours to find a solution =\