It is likely you will have to tinker with the door to get it just right. Reinstall the handle and latch and make sure they contact the strike plate. If it doesn’t latch, leave the door alone and ...