Hello, thank you for your question. My name is***** am a barrister and will assist you with this issue today.
Please be aware that this is an e-mail service rather than a live chat. Sometimes there will be some delay between responses but I will try to reply as soon as possible.
Firstly, check to see if the deposit is protected. There are only 3 approved providers, you can check them all online, the links are here: https://england.shelter.org.uk/housing_advice/tenancy_deposits/check_if_your_tenancy_deposit_is_protected.
You should have received a certificate when you moved in which tells you which scheme was used.
I wouldn't recommend leaving and not paying the last months rent. You will technically be in breach of tenancy, often the tenancy agreement prohibits you setting off your rent against other issues.
So long as the money is protected in a deposit scheme if you get in to any dispute/ they don't pay you then you contact the tenancy deposit scheme and they "freeze" the money if they hold it or require the landlord to pay it to them if not. They hold it until any dispute is resolved. So you can rest assured that you will get it back.
If you find out that the landlord didn't protect the deposit then you can claim compensation. This gets you a full refund of the deposit plus up to 3 x the value of the deposit. The good news is there are lots of "no win no fee" solicitors who specialise in these claims which you can easily find using Google.
I hope this helps, if you can please accept my answer and rate me 5 stars (in the top right of your screen) then Just Answer will credit me for helping you today.
I will remain available for any follow-up questions.