Manually changing custom_dimension_x fields to be unlimited length column

We are using an on premise installation of matomo (version 4.10.1). We have a requirement where we need the the custom_dimension_x columns to be of unlimited length.
We have manually changed the column type to text in matomo DB for custom dimension columns, but when we store bigger values, those values are still being truncated to 255 characters.
Is there anything else that I need to do after changing column type?
Is there anyway to get around this limit at this time?