openssl req \
-days 99999 \
-key root.key \
-new \
-nodes \
-out root.pem \
-sha256 \
-x509
It is a problem of the built-in Windows console.
It is not reproduced in Mintty and Windows Terminal.
So, the solution is to use Mintty or Windows Terminal instead of the built-in Windows console.