Control of the main clutch to prevent or release a tooth-to-tooth condition in the transmission