Do airline pilots have to wear face masks in the cockpit because of COVID?
I can answer this question accurately - not as an airline pilot directly, but as the son of two.
To keep it short, no. Airline pilots are free to make their own decision about their safety in the cockpit. In the airport, yes. In the taxi, bus, or ground transportation, yes. But, when they enter the cockpit, they usually sanitize the entire touch area, use some germ-x, and settle in for the 12-14 hour flight. When going back into the cabin, they put a mask back on (while on break).
There have been some cases reported in the pilot body but not enough to cause any large issue. Thanks for your question.