They do fine if you do that for a game or two, but if you constantly play them out of position their morale will drop by a huge margin and then it's inevitable that they get bad forms. Just don't use a GK for that - keepers must always be in position, otherwise it's an illegal formation.