How can I set and keep the Arduino Stack size at increased size?

If it’s defined in the build flags it should not be marked with a squiggly line. Try rebuilding the IntelliSense with Ctrl+Shift+P → Rebuild IntelliSense.