https://wiki.flashforge.com/en/adventurer-series/troubleshooting-print-quality-problems
The official stance on under extrusion is to replace the nozzle + hotend.
Replacing the nozzle + hotend didn't do it for me.
It turned out to be shredded plastic on the gears that grip the filament, aka the Extruder motor gearbox.
The way to test for this state is to see if you can pull the filament through the gearbox without the hotend installed. It sometimes will pull through with some gentle force in some places and not in others when you have shredded plastic inside the extruder gearbox.
Follow the steps of the dissassembly to get to the extruder gearbox. Don't forget the directon the fan goes when taking it off the gear box.
https://youtu.be/etIlwgE3owA?feature=shared&t=293
At that point in the disassembly you can see the first of the metal gears that grab the filament.
https://youtu.be/etIlwgE3owA?feature=shared&t=314
At this point you can see both gears side by side. One is from the tension screw side, and the other is from the shaft with the white plastic gear on it.
Clean both with a pin or a thin set of tweasers or a cotton swap or a tooth brush.
Clean those two gears and reassemble.
Part-way through reassembling you can see if you can grip a piece of filament more consistently. Check ever angle of the white gear and that you can get consistent grip on the test filament segment. Note, you should have installed and tightened the tension screw beforehand.
Some other printers have a spring loaded tension release button. Before pulling or pushing filament jams out you press the button. On the FlashForge AD5M, it doesn't have such a button.
So instead before pulling out a clog or similar, the tension screw should be unscrewed almost completely, so the extruder gears aren't gripping the plastic.