Technically, unless a helicopter's centre of gravity and centre of lift (centre of the rotor) are in perfect alignment, it would generate a pitching moment which would make it unstable.
So, how does a helicopter manage to solve this issue. (I'm assuming it's impossible to perfectly align the CG and the centre of lift due to practical loading conditions.)