I had also experienced this issue and below is how I solved it.
My case description
I wanted to remove cart item from a user collection . Below is how User my collection looks like

Future removeItemFromCart(OrderModel order) async {
try {
var userId = _firebaseAuth.currentUser?.uid;
final collection = FirebaseFirestore.instance
.collection(FirestoreConstants.pathUserCollection)
.doc(userId);
final docSnap = await collection.get();
List cart = docSnap.get('cart');
List item = cart
.where((element) => element['orderId'].contains(order.orderId))
.toList();
collection.update({'cart': FieldValue.arrayRemove(item)});
Fimber.d("REMOVED unit ${order.unit?.unitName} $userId");
PaceUser? user = await getUserCart();
return user;
} on FirebaseAuthException {
rethrow;
}
return null;}
The above code snippet solved it for me.
Happy coding