If a formula is longer than the 4,000 character limit it is simply truncated. Usually this results in an error message because the formula is no longer valid. However, if the formula ends with something that can be truncated without impacting the validity of the formula, it will work.
For example, a formula ending +1,000,000 would just add 1,000 if the formula was 3 characters too long and the user would not be aware of the issue.