Changing the RestAPI mode to "admin" should allow you to update fields, including readonly. The documentation however mentions the requirement of "admin permissions"
How to add requires admin permissions?.
Below are excerpts from the RestAPI documentation
mode -Enum: "standard" "ignoreReadonly" "admin"
Optional mode parameter that specifies validation behavior. When empty or standard, all fields will be validated. When set ignoreReadonly, readonly fields won't be set but no error will be returned. Admin value allows to edit readonly fields, but requires admin permissions.