You can’t go wrong with a full sized neutral, but there are allowances in the NEC for reduced size neutrals. The one most often used for inverters is when the neutral is only used to sense line to neutral voltage for the anti-islanding system, and then the neutral can be sth same size as the EGC.
Unfortunately I have rarely found in the manufacturer’s documentation anything stating the neutral is for sensing only or can be reduced, the terminals in the inverter usually allow a full sized neutral which can be used as an indication that the manufacturer is expecting it, and getting the answer from a support person on the phone may or may not be enough for an AHJ if they question it.