Interesting.
Open a command prompt and copy/paste/run these statements. What do you get?
sc query null
sc qc null
sc sdshow null
echo xxxx > nul
echo xxxx > c:\nul
Here's what I get on Win11.
C:\>sc query null
SERVICE_NAME: null
TYPE : 1 KERNEL_DRIVER
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
C:\>sc qc null
[SC] QueryServiceConfig SUCCESS
SERVICE_NAME: null
TYPE : 1 KERNEL_DRIVER
START_TYPE : 1 SYSTEM_START
ERROR_CONTROL : 1 NORMAL
BINARY_PATH_NAME :
LOAD_ORDER_GROUP : Base
TAG : 1
DISPLAY_NAME : Null
DEPENDENCIES :
SERVICE_START_NAME :
C:\>sc sdshow null
D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)
C:\>echo xxxx > nul
C:\>echo xxxx > c:\nul
C:\>
If you have another WS2022 machine, run those 5 commands on it and test to see if it has a problem with nul.
Reference:
https://stackoverflow.com/questions/313111/is-there-a-dev-null-on-windows