Actually you can use CON as a filename in Windows, you just have to use the right API. The command:
type CON > "\\?\C:\CON"
will create a file named CON. https://docs.microsoft.com/en-us/windows/win32/fileio/naming... has some details about this.
relevant video: https://youtu.be/bC6tngl0PTI (Tom Scott: Why you can't use CON as filename in windows)