Yeah this is a long pending change that is needed to the Pluggable Widgets API. This has been missing since day 1. I always use the Client API to do this inside a pluggable widget.
Please find my long pending struggle with this issue via this forum post from some time ago which I update a couple of times:
https://community.mendix.com/link/space/widgets/questions/105072
The answer I got from support on this missing feature was that you can implement an action with that object / entity type as input parameter and save the changes in that action.
This is indeed possible, but this runs async, meaning you won’t really know what the outcome of the action is and whether the save was successful.
This will cater for most scenarios though!
Dug into the pluggable widget API docs, and found this: when a dataSource attribute is specified on a property type 'attribute', it is passed as a ListAttributeValue.
And, subsequently, this where it says: Due to a technical limitation it is not yet possible to edit attributes obtained via ListAttributeValue. EditableValues returned by ListAttributeValue are always readonly.
This does not sound like a workaround or fix is feasible.