I noticed, when using a DHT22, the read must be done at least 5ms after any Serial.println.
The example "SimpleDHT - DHT22Default" will show this: the read sometimes fails multiple times.
Adding a delay after the serial before read2, will fix.
Serial.println("Sample DHT22...");
delay(5); // add this
You can have a better visualization of the error using the example "DHT22ErrCount": it works 100% as it is, but if you add a Serial.println(); before the read2, you'll see the success rate dropping to very low levels.
So, before any usage of the read2 function, add a delay(5) and you'll be safe.
I haven't checked other conditions, it may apply also to other functions or sensor (probably DHT11) .
So do you think it happens because the serial is still transmitting, and by flushing we make sure the transmission is completed?
I also noticed, when using pin 2 or 4 it works as we've seen until now (it works unless you print without flushing/delay), with pin 3 or 5, instead, it fails a lot , even without print or with print +flush.