I can't speak for the UK, but my leases have definitely stipulated that you can't change the locks without notifying the landlord and providing them with a key.
All of that being said, I don't understand why changing the locks makes a difference. It's very easy to ask a locksmith to open the door for you, especially if your name is on the title (not to mention that most house locks are trivial to pick anyway). Whether or not the landlord has a key is mostly immaterial, what matters is whether it is legal for them to use it (because picking the lock would arguably have similar legality).