I usually completely finish the interior of the cockpit but omit the (ejection) seat when possible (when it can be placed after putting the fuselage halves together).
Then I gently fill the cockpit with some tissue to protect it during the painting phase for accitental cases when the airbrush blows of the canopy.
Then I mask the canopy
I place the canopy in the closed position and "point" glue it with white glue from microscale that is aimed at making temporary joints.
I airbrush the transparent canopy in the color of the inside of the canopy
I airbrush the plane
I remove the canopy, remove the tissue, clean up ...
I glue the canopy in its final position, open or closed.
The alternative is to use the canopy as a kind of template to cut masking tape and close the cockpit with masking tape. It remains a problem that you then have to paint the canopy seperately, and in my experience (or clumsyness) this often leads to holes and overspray inside the cockpit.
I hope this helps