Instead of :
<Style x:Key="TabItemContainerStyle" TargetType="TabItem" >
....
....
</Style>
Try below code :
<Style x:Key="TabItemContainerStyle" TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}" >
....
....
</Style>
Or if it does not work, then
Change
BasedOn="{StaticResource {x:Type TabItem}}"
to
BasedOn="{StaticResource NameOfYourStyleDeclaredInTheme}"