How can I make sudo in 2 tabs ask for the password only once?
Try adding:

Defaults !tty_tickets


to /etc/sudoers. Tested on 10.13.6 (High Sierra).

From the man page:


  If set, users must authenticate on a per-tty basis.  With this flag
  enabled, sudo will use a separate record in the time stamp file for
  each tty.  If disabled, a single record is used for all login
  sessions.  This flag is on by default.