Typically, only the requirements of military duty compels a landlord to return a security deposit to a person breaking a residential lease.
But you may wish to check your own local and state laws.
You may also ask the landlord with politeness and grace to see if he will return the deposit out of the kindness of his heart…