If you enter a limit farming event, you can’t leave it until it finishes. As soon as you join farming, your funds are locked and will become available only when the farming event ends.
If you enter infinite farming, you can leave anytime you want to.