By default, WPF reads all controls inside and outside of your UserControl at the same tab level. Since the controls inside your UserControl do not have the specified TabIndex pointer, they get the tab to the last after the first tab loop.
, , - IsTabStop="False" UserControl ( UserControl), UserControl TemplateBinding TabIndex UserControl TabIndex
<TextBox x:Name="Ytextbox" Background="Yellow"
TabIndex="{Binding Path=TabIndex,
RelativeSource={RelativeSource AncestorType={x:Type local:customtextbox}}}"/>
<my:customtextbox IsTabStop="False" KeyboardNavigation.TabIndex="0"
Grid.Column="1" InfoText="{Binding msg}" Height="20"/>