Yes, I think pressing Cancel button should not change "Target session" at all.
Try this:
Open PL/SQL Developer - Compare User Objects - choose "Target Session" schema, next step: open new PL/SQL Developer session (menu File, New Instance) - Compare User Objects - choose different "Target Session", next step: go back to to the first PL/SQL Developer session - click "Target Session", and Cancel, please note that "Target Session" changed to the one chosen as a "Target Session" in second PL/SQL Developer session.