Replace GFCI outlet or the brand new washing machine?
TL;DR Test with an extension cord to another GFCI
It is probably the machine. Unlike the situations with refrigerators, where water is not involved (except the ice maker) and where food spoilage is a big concern, washing machines have no real &quot;excuse&quot; not to be on GFCI. Plus GFCI is mandated for the the laundry room under current code, so the machines really should be designed to work properly on a GFCI.
But it is possible for a GFCI receptacle to go bad. The only practical way to prove it (short of replacing it) is to temporarily connect the washing machine with an extension cord to a bathroom or kitchen GFCI. If that has the same problem (trip every time the water pump turns on) then you have a bad washing machine - despite being brand new. If that works fine (and assuming the standard GFCI test on that receptacle works as expected), then you have a bad GFCI receptacle in the laundry room and replacing it should solve the problem.
How, you may ask, can a brand new machine have a ground fault? Mass produced electronics, appliances, cars and many other things are not 100% tested at the factory. Mistakes can happen - some that can easily cause a problem of this sort include:

Loose wire
Ground &amp; neutral wires swapped
Insulation scraped off a wire during installation
Pinched wire
Bad connection to the pump, resulting in water leaking onto wires

Even a quick power-on self-test at the factory (which may or may not be routine, depending on the manufacturer) wouldn't reveal this fault because (a) they would not have a need to run the test on a GFCI-protected circuit (the factory floor is not an actual laundry room) and (b) they would not run the machine with water and (c) because they are not running the machine with water, they may not run an actual pump cycle