Definitely check fastboot flashing get_unlock_ability
immediately before locking.
And don’t boot into Android after flashing it, the first boot resets it to 0
(The reason being that’s how you get your phone delivered and there are apps that check for that).
Flash → Check → Lock