Well, as you probably know, the window should not be operable with the power off lol. I cannot possibly imagine how the window and headlight could be related, but the window issue is SO mysterious that now I wouldn't be surprised if they are somehow related. If you want to diagnose the problem yourself, you will need to start with a multimeter and a basic tool set.
The front doors each have a regulator unit (power control box, is one way to put it). Typically these either work or do not work, not somewhere in between... and should never allow power to the window motor without the key in the Ignition or On position. You could begin by looking in the fuse panel (near the parking brake release lever) and inspect for any aftermarket wiring or anything weird that doesn't look factory. If you find any really odd wiring in plain sight, then a previous owner may have possibly rigged something up using poor wiring methods. If so, it will need to be repaired to factory condition.
If you don't find any crazy in there, then you'll need to remove the passenger side interior door cover. This will take time if you haven't done it before. Follow the shop book or browse the web for how to do this. It will involve several screws, some pulling here and there, disconnecting plugs, and some lifting up and off. Once removed, you should clearly see the regulator box (especially since you will have to unplug it when removing the door skin). Check for any loose wires, weird non-factory wiring, ect. If you find anything of the sort, it will have to be returned to factory specs.
Use the shop manual / repair book to find the +12V input wire to the regulator module. Test with the multimeter to see if it is live (has +12 Volts with the key off). I do NOT think it should be live, but perhaps someone can correct me on this one. If it is live (+12V) and if it is not supposed to be (I think not) then somehow it has become wired into a live circuit from the battery. Not a good sign...
If nothing weird is found so far, then follow the shop manual / repair book on how to test the regulator module (box) for proper function. This will either pass or fail. If it fails, or if it's just easier for your circumstances, go get a used one or two from a junkyard or buy one on the web. They aren't too expensive for the passenger side. Replace it and test your window.
Here's what I would guess has happened: for some reason somebody has seriously messed with the factory wiring in your Q45. Who knows why, but it happens sometimes when buying a used car. Somehow your window regulator or window switch is getting live power (+12V) with the car off. Also, somehow your headlight is shorted or has blown a fuse. Be sure to check the fuses for the headlight circuit. There is a fuse panel inside the engine bay also, check those. There should be +12V to the headlight whenever the headlight switch is fully ON, obviously lol, and at no other time.
Good luck buddy, you could be chasing ghosts for awhile on this one...
