This happened to me. Basically when the car came out the original torque spec was super low on the FSM. Subaru updated it within the first couple of years but people with old Hayne's manuals or whatever still have the old torque spec, so sometimes a mechanic that's unfamiliar with Subarus will leave it too loose.
The way I fixed it was to get a new woodruff key, new harmonic balancer, and new crank gear and go with some red loctite and just crank it down. The crankshaft nose was gouged on one side of the key slot but it was intact on the other, so that was enough to keep it in place. That being said, some of the other users replying here seem to have more thorough and less janky methods of fixing this.
Hope this helps.