I use keepass to store login details for my electrum wallet so 100% correct that the password is correct however its returning a error that the key isnt valid
If it says it's incorrect then it's incorrect , you probably by mistake deleted the AppData folder or updated another wallet file to electrum to read otherwise it would make sense .
I'am not sure if electrum allow you to export private keys without the need of the passwords , if it does then export them and import them to another wallet