Description
The Calculate Field tool cannot be used if the input feature service is in a current edit session, or if you have turned on the Enable Undo toggle button in the Geoprocessing pane.
The Calculate Field tool can be used on an input feature service in a versioned edit session if the data is registered as branch versioned and has the version management capability enabled.
Solution
Save or discard your edits before running the Calculate Field tool or turn off the Enable Undo toggle button in the Geoprocessing pane.