Why does sudo ask for a password in window after I've just authenticated in a different one?

The grace period is controlled by what sudo calls a 'ticket'. When you authenticate with sudo, it creates this ticket with a certain timestamp that basically says when the authentication should expire.

By default (this is set when the package is compiled), this timeout is, as you've found, per tty. This is a feature of sudo called 'tty_tickets'. Basically this means that, instead of creating one lock per user, sudo creates one lock per tty instead.

In order to revert back to the old behaviour and override the default, you need to edit /etc/sudoers. Find the "Defaults" line, which you already edited to change the timeout, and append ,!tty_tickets to it. This will turn off the tty_tickets feature and give you the behaviour you want.