The same as as a fly inside a car that accelerates rapidly. Or a bus, plane, train, etc.
This has been discussed many times before. Not only does the vehicle move in a particular direction, but so does everything else in the vehicle. Owing to the size of the fly, the chances of it “slamming” into the back of the cockpit are almost non-existent. Remember all the air in the cockpit is accelerating forward as well.
OTOH, a very heavy object will have greater inertia than the fly - an object at rest tends to say at rest - and could very well “slam” into the back of the cockpit.
Without being illegal (A professional driver on a close course thingie disclaimer.) sit in a very high performance vehicle, holding a marblel in one hand and a 16-pound bowling ball in the other, both at arm’s length directly in front of you. Now have the drive pop the clutch and floor it from a standing start to 100 mph in five seconds.
Which arm and which part of your body is going to hurt from that acceleration?