If it's a master-detail (multiple levels) grid then there is a DataGridContext for the top level, but also one for each expanded detail group.
In this case the error may go away by calling EndEdit() on the row rather than the grid.
if (myGrid.GlobalCurrentItem is DataRowView row && myGrid.IsBeingEdited) row.EndEdit();
This could be classed as an Xceed bug as you'd expect your code to work.
Tracking Xceed errors down can involve knowing exactly what order of clicks and presses the user has done.
For example, once a user has put a cell into edit mode by clicking on it you can then find you can't update the values programmatically until you've called the EndEdit().