https://www.stardock.com/products/groupy/ does this already for any app, its a tiny bit buggy in windows 11. automatic grouping of explorer windows doesnt work at least, but the "new tab" button works.