Help with Elementor Pagination archive 404 problem

The pagination links in CPT archive created with Elementor Pro get a 404.

I’ve spend a full day searching and trying everything I found on Google with search "CPT Elementor archive pagination 404": readjust posts per page in write settings, tweak Function.php, tweak cpt php (in my case as a custom made plugin , see herafter) and some other… none resulting in a partial or full solution.

Example of page resulting in 404 is here: https://developer.mkorke.net/guide-voyage-chili-argentine/voyage-atacama/page/2/ (access with admin/admin). The standard archive pagination links work perfectly (https://developer.mkorke.net/guide-voyage-chili-argentine/). This is test site, same happens on proper website.

This is driving me crazy. I’m doing my best with the beginner knowledge I have. Please help.

    add_action('init', 'CT_temoignage');     function CT_temoignage()     {         register_post_type('post-temoignage', array(          'label' => __('Témoignages'),          'singular_label' => __('Témoignage'),          'public' => true,          'has_archive' => true,          'show_ui' => true,          'capability_type' => 'post',          'hierarchical' => false,          'taxonomies'=> array ('category', 'post_tag'),          'supports' => array('title', 'author', 'editor', 'thumbnail','excerpt','revisions','page-attributes','publicize', 'wpcom-markdown'),          'menu_position'=>5, 'rewrite' => array('slug' => 'temoignages','with_front' => true),                             // 'query_var' => 'temoignage'           'publicly_queryable' => true,     'query_var' => true,     'rewrite' => false,         ));         add_theme_support( 'post-thumbnails' );                  global $  wp_rewrite; $  gallery_structure = '/temoignages/%post-temoignage%'; $  wp_rewrite->add_rewrite_tag("%post-temoignage%", '([^/]+)', "post-temoignage="); $  wp_rewrite->add_permastruct('post-temoignage', $  gallery_structure, false);     }     // Add filter to plugin init function add_filter('post_type_link', 'post_temoignage_permalink', 10, 3);     // Adapted from get_permalink function in wp-includes/link-template.php function post_temoignage_permalink($  permalink, $  post_id, $  leavename) {     $  post = get_post($  post_id);     $  rewritecode = array(         '%year%',         '%monthnum%',         '%day%',         '%hour%',         '%minute%',         '%second%',         $  leavename? '' : '%postname%',         '%post_id%',         '%category%',         '%author%',         $  leavename? '' : '%pagename%',     );       if ( '' != $  permalink && !in_array($  post->post_status, array('draft', 'pending', 'auto-draft')) ) {         $  unixtime = strtotime($  post->post_date);               $  category = '';         if ( strpos($  permalink, '%category%') !== false ) {             $  cats = get_the_category($  post->ID);             if ( $  cats ) {                 usort($  cats, '_usort_terms_by_ID'); // order by ID                 $  category = $  cats[0]->slug;                 if ( $  parent = $  cats[0]->parent )                     $  category = get_category_parents($  parent, false, '/', true) . $  category;             }             // show default category in permalinks, without             // having to assign it explicitly             if ( empty($  category) ) {                 $  default_category = get_category( get_option( 'default_category' ) );                 $  category = is_wp_error( $  default_category ) ? '' : $  default_category->slug;             }         }         $  author = '';         if ( strpos($  permalink, '%author%') !== false ) {             $  authordata = get_userdata($  post->post_author);             $  author = $  authordata->user_nicename;         }         $  date = explode(" ",date('Y m d H i s', $  unixtime));         $  rewritereplace =         array(             $  date[0],             $  date[1],             $  date[2],             $  date[3],             $  date[4],             $  date[5],             $  post->post_name,             $  post->ID,             $  category,             $  author,             $  post->post_name,         );         $  permalink = str_replace($  rewritecode, $  rewritereplace, $  permalink);     } else { // if they're not using the fancy permalink option     }     return $  permalink; }    ?>