My understanding is that digitalWrite(D9,HIGH) refers to the pin marked D9, but digitalWrite(9,HIGH) refers to GPIO 9, which is not actually usable because it's one of the pins used to communicate with the flash chip. That is, unlike a normal Arduino, D9 and 9 are not the same pin.
For bad reasons, the NodeMCU people started this alternate pin mapping that uses different numbers than the GPIO's are numbered. Wemos followed this convention in their silkscreen. Everyone else uses the GPIO numbers.