Important notice to those who use JLCPCB: Apologies from atommann (an engineer from JLCPCB), about Gerber X2 files at JLCPCB. At the moment they are not able to handle gerber X2 / aperture macro combination properly in gerber files.
The working solution for 5.99 until JLCPCB gerber processing is changed

This change is relatively new in 5.99. It is possible that there are other manufacturers who have problems with gerber X2 + aperture macro combination.
EDIT: It’s not necessarily the combination of these two, but JLCPCB has had some problems with X2, and now has with the new aperture macros produced by KiCad even though aperture macro itself is an old feature of X1. In any case disabling both should always work.