I was able to solve the problem. After a long search and comparison with working websites, the cause is very simple.
In the search form I had stored the class ‘wpcf7’ from CSS. This form has no ID compared to CF7 forms.
I assume that when CF7 renders, it looks for all forms with the class ‘wpcf7’ and passes the id in them to the Rest API.
In my case, the CF7 script doesn’t find an ID in the search form, that explains NaN.
After removing the ‘wpcf7’ class in the search form, everything works fine ??
Thanks for the best WP Plugin!!!