This question is very similar to this one. I'm using an ESP8266 for which the maximum analogWrite value is 1023 rather than 255 for some other Arduino boards, but I believe the principal is just the same.
I'm driving 3 LEDs directly from 3 outputs via current limiting resistors.
When I turn them on using analogWrite(PIN, 1023) they are not quite a bright as when the same LED is driven by the same pin using digitalWrite(PIN, HIGH). Which leads me to think that either 1023 does not give a 100% duty cycle or the maximum voltage in the analog case is less than that in the digital one. Is this to be expected? Are the pins significant (4,5 and 14)?
Another similar Q&A would lead me to believe they should be the same.