The canopy has a unique slide mechanism where it slides into place ontop of the door frame.

Therefore, in order to slide the canopy open or closed, the door MUST be both LOCKED & CLOSED. 

The door has 2 separate clickspots - one on the door itself, to swing it open and closed. The other is the door lock handle, which locks & unlocks the door when it is closed.

In summary:

DOOR OPEN or UNLOCKED = Canopy cannot move

DOOR LOCKED = Canopy can open or close freely

This is modelled true to the real spitfire door/canopy, which employed this mechanism as a means to lock the canopy open for takeoff and landing.