Solution is to set the language standard to C++ 20 as described here:
https://www.learncpp.com/cpp-tutorial/configuring-your-compiler-choosing-a-language-standard/
Then go to Project -> Export template. Then use the new template next time.