That's a good question. If it were me, I'd probably try either Loctite or JB Weld. I'd probably try Loctite Red (271) first to see if it worked. I've had a lot of luck with it in this kind of situation (although I've never tried it in your specific type of problem with a brushless motor). If that didn't work, I'd try JB Weld. With JB Weld, I'd scuff up, or even groove, the two surfaces to provide more for the glue to grip to and resist rotation.