Let new hires test out teams before joining full-time. It only took me a week to realize that our team was married to a stupid project, and that team's leadership was invested in it. It took a few more months to read the signs and realize that upper management probably agreed with me, but regardless, I couldn't find a way to escape.
If I'd been able to test out a few teams before joining, I would have definitely joined a different one and maybe had a good time. Instead, I left. Quickly.