Random transformations and invariance of semimartingales on Lie groups