You can try this
/*
* Increase the limit of posts per page in json
*/
add_filter( 'rest_your_collection_params', function ( $params, WP_Post_Type $post_type ) {
if ( 'your_cpt' === $post_type->name && isset( $params['per_page'] ) ) {
$params['per_page']['maximum'] = 99;
}
return $params;
}, 10, 2 );