required or readonly attributes have precedence over states
From https://www.tryton.org/~irclog/2021-12-29.log.html
So it's interesting to note that on docs
As this can not work if the attribute is directly defined on the field.
cls.<field name>.states['readonly'] = <PYSON expresion>
You need to do:
cls.<field name>.readonly = <PYSON expresion>