Hi @LukaszMa,
Yes, most large text fields (including custom parameter calculations) have a maximum of either 2000 characters or at 4000 characters, which you can confirm by pasting a string of text near those (database controlled) limits to see what saves, and what fails.
As a workaround, if you can shorten your syntax to fit, I’d recommend that first; otherwise, you may have to resort to chaining your logic by layering it across two or more calculations (which is harder to maintain, and might lead to stale data).
Regards,
Doug