I found another solution using some custom code. Dropping it here for future readers.
I also really like @Incognito_Agency’s solution. The only real difference between my solution and there’s is that my solution does not change the tab onClick. If you don’t care about that, then go with Incognito_Agency’s solution.