Whether to renege accepted offer?

I accepted a SWE offer at a new company in a role that is "hotter" and I would learn new skills, but less total compensation than my previous role. I've been wanting to switch teams at my current company but haven't been allowed to, so that's what inspired me to apply to other roles. Right after I accepted my offer, it turns out my current company is moving around the teams to put me on the team I was hoping to join.

I'm trying to think through whether to keep the accepted offer and take a risk to try something new that would provide me a new in-demand skill set and learning opportunities, but I'm not sure I would enjoy the work itself as much as my current role. I have about 5 YoE, so trying something new might still be a good idea for my career growth. On the other hand, if I were to renege the offer, my new team at my current company is a known quantity, and being certain I would get along with my new manager and teammates is a huge benefit.

Just looking for any support or opinions thinking through this! I know the decision is ultimately up to me but I'm pretty torn and any additional perspective is welcome.