Xiaomi Mi A1 How to change the screen lock code NOT the sim lock code The title says it all.  

It seems there is no way to change the screen lock code for this phone.

I am not looking to change the sim lock.
I am not on stock ROM on that device but as I recall Settings &rarr; Security ( and location?) &rarr; Device Security &rarr; Screen Lock. 

You need to enter your PIN to change screen lock