Weird issue with multi-select field with large number of options

Your software
My Mautic version is: 4.4.10
My PHP version is: 8.0
My Database type and version is: MariaDB 10.3

Your problem
My problem is:
Hi everyone.
I’m encountering a weird issue lately. I am using an API to create new multi-select custom field. I have a large number of products where I use SKU => Product name and it works great.
I can create the field and add more than 1000 entries to it.

But the issue occurs when I try to update the contact’s custom field with the SKUs. For some values from the custom field, everything works okay. But then, there’s some random values that are present in Custom field, but i get the message

{"errors":[{"code":400,"message":"ms_purchased_products: This value is not valid.","details":{"ms_purchased_products":["This value is not valid."]}}]}

I’m guessing there’s some limit, but in database, the lead_fields properties column is LONGTEXT so storing data in there shouldn’t be a problem.

I am confused what could be the problem.

The only issue I’ve found on Github that’s remotely close to this is #3747 but there’s no explanation other than it’s the system limitation.

These errors are showing in the log:
No errors
Steps I have tried to fix the problem:
Tried to pinpoint the part in code that’s responsible for parsing the data from the lead_fields.properties column but without success.