How can I install a light fixture when the junction box is partially blocked by a mirror?
This one is a huge bummer. You don't have many options here.

Either cut out the box and replace it higher up, or re-mount it higher on the stud, or lower the mirror. Whether you can re-use the box depends on what kind of box it is and how it is mounted. I think moving the box is by far the easier option.