Ajax load more button messages

I'm trying to use this tutorial but it does not work: https://artisansweb.net/load-wordpress-post-ajax/

The correct order is: Post 4, Post 1, Post 3, Post 2. The first 2 items are OK (before clicking), but when I click the button, the results are incorrect (Post 2, Post 1 again) instead of Post 3, Post 2

This is my code:

PAGE MODEL:



& # 39; & # 39 ;, post & # 39; post_status & # 39; => & Quot; publish & quot; & # 39; orderby & # 39; => & # 39; date, & # 39; order & # 39; => & # 39; DESC & # 39; & # 39; posts_per_page & # 39; => 2, & # 39; paginated & # 39; => 1 ) $ my_posts = new WP_Query ($ args); if ($ my_posts-> have_posts ()) { ?>
have_posts ()) {$ my_posts-> the_post (); ?>

THE FUNCTIONS:

function load_posts_by_ajax_callback () {
check_ajax_referer (& # 39; load_more_posts & # 39; security & # 39;);
$ paginated = $ _POST['page'];
$ args = array (
& # 39; post_type & # 39; => & # 39; post,
& # 39; post_status & # 39; => & Quot; publish & quot;
& # 39; orderby & # 39; => & # 39; date,
& # 39; order & # 39; => & # 39; DESC & # 39;
& # 39; posts_per_page & # 39; => 2,
& # 39; paginated & # 39; => $ paginated
)
$ my_posts = new WP_Query ($ args);
if ($ my_posts-> have_posts ()) {
while ($ my_posts-> have_posts ()) {$ my_posts-> the_post (); ?>
            

<? php the_excerpt (); }; }; wp_die (); } add_action (& # 39; wp_ajax_load_posts_by_ajax & # 39;; & # 39; load_posts_by_ajax_callback & # 39;); add_action (& # 39; wp_ajax_nopriv_load_posts_by_ajax & # 39;; & # 39; load_posts_by_ajax_callback & # 39;);

What's wrong?