Now this is kind of an "Iffy" thing
There are two ways the door switch works and two ways for each way
ONE is a "plunger" type switch in teh door jam, normally hinge side, this is rare but I have seen ONE such switch.
The more common is a magnetic Reed Switch, USUALLY at the lower corner of the jam on the latch side just above the sil.
IF the screen door is bent.. it can fail to activate that switch or normal flexing of the RV can cause it to operate the switch only sometimes.
Try sliding the access panel. depressing the screen latch placing your toe against the bottom of the door and pulling just a bit to "Bend" the door so the bottom closes a bit tighter. Can not guarantee.
Option 2: Fairly light weight wires connect that switch to the controller.. Can fail Depending on the other 2 ways (THe age of the controller mostly) the reed switch either follows the door (Closed is closed) or opposes it (closed is open) so either a SHORT or Open in those wires can cause the same symptoms if it is making and breaking as you drive.
Home was where I park it. but alas the.
2005 Damon Intruder 377 Alas declared a total loss
after a semi "nicked" it. Still have the radios
Kenwood TS-2000, ICOM ID-5100, ID-51A+2, ID-880 REF030C most times