Please try using a HOME_OFFSET of 0.1 inch. You want the axis to be off the home switch after homing. Not sure whether this should be positive or negative. If it fails, change the sign and try again...
I ordered new switches and replaced them and now the homing sequence is working and latching fully. Now homing works all the time with no errors and I did not change any settings in the configuration.
The old switches are at least two years old so it could have been contact bounce. Big thank you to everyone for your resourceful feedback and kind help.