Changing the role in Portal for ArcGIS from Viewer to Data Editor via Python (user.update_role) only affects the displayed role in Portal for ArcGIS, but does not change the privilege.
Described situation does not occur with API for Python release 1.8.3 connecting to an Enterprise 10.8.1. An admin is able to create a new user with the viewer role and user_type, then use the update_role() and update_license_type() functions to update the user to an editor role and user_type. After reconnecting as the new user and retrieving a feature layer, the editor could update a feature layer.