The WPF Event PreviewTextInput is specific to WPF's implementation of all Controls. I cannot replicate the behavior you observe in WPF in WinForms.
After some thought, I conclude that you are having two problems:
1. unexpected side-effects of the replace operation
2. failure to observe expected change in the position of the insertion cursor in the TextBox.
Issue #2 can, I hypothesize, be explained by the fact that
the TextBox Control must have Focus before the operations you perform.
Issue #1 is more puzzling. But, a good first step in evaluating whether both issues might be related to the TextBox not having Focus is for you simply to re-locate setting Focus to the TextBox
before you operate on it:
txtPlannedHours.Focus();
txtPlannedHours.Text = txtPlannedHours.Text.Replace(txtPlannedHours.SelectedText, e.Text);
txtPlannedHours.SelectionStart = txtPlannedHours.Text.Length;
Now, if this change makes no difference, the next logical hypothesis is that there is something in the specific WPF Event you are handling that's affecting the outcome here.
So, it becomes even more critical to carefully observe ... by using break-points, or writing to the Console ... what the values of both the 'SelectedText and the value of e.Text is before and after you execute your code that changes the contents of the TextBox.
I suggest you try a variety of selections, and look at the before-and-after values, and see if you see a pattern. Consider posting those observations here.