c# wpf problems with newline

I am creating a test version of the page where text will be entered and adjusted, or rather compared with the original and, depending on this, the color of the symbol will be set (if the symbol is entered as in the text – white, otherwise red). The only problem I have is that in the textblock, for example, there is a word that is on a new line, in the textbox when entering, or rather during the process, the entered word will first be at the top and only after being completely written at the bottom (or even leave half of the text at the top, I am attaching a screenshot) . I honestly don’t know how to solve this, so I hope for your help! I will also be glad if you point out any mistakes made in working with the MVVM code (as I said, the code is test and the same binding in the view in the original will be removed and added to OnStarted)

View code:

    <Window.DataContext>
        <local:MainViewModel/>
    </Window.DataContext>

    <Grid Background="#282a36">
        <TextBlock Text="{Binding OriginalText}"
                   FontFamily="Consolas"
                   Foreground="Gray" 
                   FontSize="16" 
                   IsHitTestVisible="False"
                   TextWrapping="Wrap"/>
        <TextBox Text="{Binding UserInput, UpdateSourceTrigger=PropertyChanged}" 
                 FontSize="16" 
                 FontFamily="Consolas"
                 Background="Transparent" 
                 Foreground="Transparent" 
                 BorderBrush="Transparent"
                 TextWrapping="Wrap"/>
        <ItemsControl ItemsSource="{Binding ColoredUserInput}" VerticalAlignment="Top">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel Orientation="Horizontal"/>
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Character}" 
                               Foreground="{Binding Color}" 
                               FontSize="16"
                               FontFamily="Consolas"/>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </Grid>

MainViewModel

    public class MainViewModel : INotifyPropertyChanged
    {
        private string _originalText = "The curious cat explored every corner of the garden, chasing butterflies and sniffing at freshly bloomed flowers. Meanwhile, the old oak tree stood tall, its branches swaying gently in the summer breeze. Birds chirped happily overhead, creating a symphony of natural sounds. The sun painted the sky in shades of orange and pink as evening approached.";
        private string _userInput;
        private ObservableCollection<ColoredCharacter> _coloredUserInput;

        public MainViewModel()
        {
            ColoredUserInput = new ObservableCollection<ColoredCharacter>();
        }

        public string OriginalText
        {
            get => _originalText;
            set
            {
                _originalText = value;
                OnPropertyChanged();
            }
        }

        public string UserInput
        {
            get => _userInput;
            set
            {
                _userInput = value;
                OnPropertyChanged();
                UpdateColoredUserInput();
            }
        }

        public ObservableCollection<ColoredCharacter> ColoredUserInput
        {
            get => _coloredUserInput;
            set
            {
                _coloredUserInput = value;
                OnPropertyChanged();
            }
        }

        private void UpdateColoredUserInput()
        {
            ColoredUserInput.Clear();
            for (int i = 0; i < OriginalText.Length; i++)
            {
                if (i < UserInput.Length)
                {
                    var character = OriginalText[i];
                    var color = UserInput[i] == character ? Brushes.White : Brushes.Red;
                    ColoredUserInput.Add(new ColoredCharacter { Character = character.ToString(), Color = color });
                }
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }

    public class ColoredCharacter
    {
        public string Character { get; set; }
        public Brush Color { get; set; }
    }

Attempted solutions were only guesswork. For example, somehow track whether the next word is wrapped and, if so, add n

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật