This is what worked for me. Put the entry.Text inside the Dispatcher.
https://github.com/dotnet/maui/issues/25728
Dispatcher.DispatchAsync(() =>
{
if (sender is Entry entry)
{
entry.Text = texto.Insert(texto.Length - 2, ",");
entry.CursorPosition = entry.Text.Length;
}
});