This sounds load related. There isn't any load on the engine when it's in neutral, but when you put it in gear, there is. This could be related to the ignition or fuel system, you'll need to have a diagnosis of both systems performed to know what this might be.