UPDATE: It seems that Blizzard has now fixed the PVP/Battlegrounds tabs and they can now be closed using Esc by default, making this WeakAura deprecated.
---------------------------
Allows the new PVP/Battlegrounds tab to be closed by pressing the Esc key.
Credit: Sudden_Panic_8503 of the classicwow subreddit for figuring out that you can use UISpecialFrames to make this work!