Show banners after n posts in CPT with working ajax pagination

When I am try this code I have troubles woth ajax load more pagination.
“Next page” button just skips 11 posts somewhat, so the posts 1-10 showing the right way with featured banners between them, than posts 21-32 without posts 11-21 which should be displayed.
:confused:
Please help.

@section('content')
   @while (have_posts()) @php(the_post())
    @if ('count'==2)
      {{-- Banner 1 --}}
      @include('partials.content-'.get_post_type())

    @elseif ($post==10)
      {{-- Socials banner fullwidth --}}
      @include('partials.content-'.get_post_type())
      
    @else
      @include('partials.content-'.get_post_type())
    @endif

    @php ($post++)

  @endwhile

@endsection

@section('ajax-load-more')
  @php (load_more_button())
@endsection

Solved by switching to https://wordpress.org/plugins/malinky-ajax-pagination/