Would it be that the car thought the key was still inside and therefore not lock - how close were you to the car;
Try it from 10 ft away.
or you had it in P and engine off when trying to lock, that the screen showed the eco trees and shut down?
Or if had pressed the button once more it waits for footbrake or second press for ACc.
Sometimes I need to 'start' fully and then press to turn off if I have forgot to put in
Or you, or partner had second key with them, in glovebox, in jacket.
I know if you leave car with engine ' running ' it will beep if you leave with keys
And when I powered car off, but stayed in the car for 5 mins it doesn't allow restart but need door open , closed, keys against start bttn to allow restart.
It seems to want straightforward scenarios to power on or off.
So I wouldn't panic just yet. Try it again, make sure dash is saying goodbye before getting out of car.