Shortcut to Mushrooms doesn't need to have been on the battlefield when the permanent you controlled left the battlefield. For example, if a creature dies during combat on your turn and you cast Shortcut to Mushrooms during your second main phase, its last ability will trigger at the beginning of your end step.