On our Jayco - the same thing happens. That's normal. It finally dawned on my one day why the steps are connected directly to the battery.
There is a switch on ours labeled "Exterior Steps". If we flip it, then the steps stay down when the door is closed.
When we put the RV away for storage, and flip the battery disconnect switch, then close the door, the steps retract - which is what you'd want.
If we put the RV in motion, the steps retract - again what you'd want.