MK2 Belt moves outward off rear pulley

This one looks like mine that flange pops off to the outside and the belt moves out off the pulley, stopping the bike. Then I would take the wheel off and peen the flange back on but it wouldn’t stay on securely. So I thought of getting it welded on if that was doable but instead I used JB weld epoxy and so far that is holding and its working for me.