Hi, good day!
When was the last time it worked properly?
Do you use a built-in or external keyboard?
Please check if you have any macro software installed and look for custom bindings involving the ESC key.
Please try to reinstall the Keyboard driver
Open Device Manager
Expand Keyboards
Right click the keyboard driver and select Uninstall device
Restart your computer to reinstall the keyboard driver automatically
I look forward to receiving your update and I'm willing to collaborate with you till we resolve the issue. Do keep me informed by clicking "Add comment" below.