There have been instances where errant window opening, partial opening, etc has been attributed to water ingress into the boot lock.
Some have tried hairdryers to dry this out, or WD40. I don’t know how successful either method has been.
There have also been instances where a failing car battery has been the cause of various random electrical issues, and a replacement battery has resolved the problems.
Of course there is always the chance that it could be a problem with the window mechanism