So sliding doors on the wall look ugly! There are also sliding doors that run inside the wall, but then you only have a drywall, that is plasterboard walls. If you like that, so be it.
With us, the lockable sliding door looks like in the following pictures. It could also be designed with a key, but that is not necessary for us because the dog cannot distinguish between the two.