I am able to update vector features in GeoServer with JavaScript code using the OpenLayers v6.5.0 library in the below straightforward manner:
OpenLayers v6.5.0
const