Hi,
The reason why keyboard layout is changed after you lock your Windows screen is, that you are probably not using default keyboard layout. If you are using other than default keyboard layout and you lock your screen, the layout is changed to the default one.
You can change the default keyboard layout in:
Settings >
Devices >
Typing >
Advanced keyboard settings - at the bottom