I have a solution where you can clip the border/underline from the Entry. We can also use negative values in the Margin to remove the excessive whitespace.
<Entry WidthRequest="200" HeightRequest="44" Margin="-4">
<Entry.Clip>
<RectangleGeometry Rect="4,10,192,24" />
</Entry.Clip>
</Entry>
Then, we can reapply our own customize Border, e.g.

<Border Padding="4" HorizontalOptions="Start" StrokeShape="RoundRectangle 5">
<Border.Triggers>
<DataTrigger
Binding="{Binding IsFocused, x:DataType=Entry, Source={Reference entry}}"
TargetType="Border"
Value="True">
<Setter Property="Stroke" Value="Navy" />
</DataTrigger>
</Border.Triggers>
<Entry
x:Name="entry"
HeightRequest="44"
WidthRequest="200"
Margin="-4"
HorizontalOptions="Start"
VerticalOptions="Start" />
<Entry.Clip>
<RectangleGeometry Rect="4,10,192,24" />
</Entry.Clip>
</Border>
I have an alternate solution where I put the Entry and Label inside the same Grid but set the Opacity of the Entry to 0 so that you do not see the original border and underline. The challenge there is to recreate the look of the Entry with the Label.
<!-- MaskedEntry.xaml -->
<ContentView>
<Grid>
<Border Padding="10">
<!-- I set Label.Text in this snippet but it is better to set Label.FormattedText -->
<Label
x:DataType="Entry"
BindingContext="{Reference entry}"
Text="{Binding Text}" />
</Border>
<Entry x:Name="entry" Opacity="0" />
</Grid>
</ContentView>
The advantage of this pattern is you have complete customization of the appearance. You can also add regex validators to prevent invalid input. In practice, I set Label.FormattedText instead of Label.Text with more sophisticated logic to support text selection and cursor positioning.
With a bit of customization you can achieve something like this:

<local:MaskedEntry
MaxLength="10"
Placeholder="Enter a 10-digit integer"
RegexMask="^[\d]{0,10}$"
WidthRequest="300" />
<local:MaskedEntry
Placeholder="Enter a license plate (format AAA999)"
RegexMask="^([A-Za-z]{0,2}|[A-Za-z]{3}[\d]{0,3})$"
WidthRequest="300" />
I have a functional demo in this GitHub repo: https://github.com/stephenquan/MauiMaskedEntryDemo/blob/main/MauiMaskedEntryDemo/MaskedEntry.xaml