Pick "Edit configuration template", from lower left corner (not just "Add new run configuration"). Then ensure the Jest configuration looks like this:

At least until node makes it a default to allow ESM modules. Not true as of node v20.10 in Dec 2023.