Nope this is a safety measure most manufacturers have taken to prevent people from leaving their Keys inside while the engine is running and locking themselves out.
The way they see it, is there's no reason to have to lock the doors while the Engine is running.
As long as the Engine is running you can't lock the Doors and as far as I know there's no way around this fix. Unless you can find the safety switch that controls this and remove it. You won't be able too.
Sadly you'll have to leave the Dogs at home because leaving them inside a car on a sunny day can be a death sentence. Even if it's only for a few minutes.
Sorry!