I think gaslighting is a really bad term for this phenomenon. It's real, and something that needs to be addressed, but it seems to me that gaslighting is intentional, and a way to manipulate someone else. I don't think that's what is usually happening when a doctor dismisses symptoms as psychosomatic. They're wrong, and their biases play a role in being wrong, but I don't think they are generally manipulating someone to get the desired outcome from them.
From Psychology Today (https://www.psychologytoday.com/us/basics/gaslighting) "Victims of gaslighting are deliberately and systematically fed false information that leads them to question what they know to be true, often about themselves. "
That's different than the doctor thinking they are exaggerating, or that there are psychosomatic causes behind their stated symptoms, primarily becuase of the "deliberate and systematic" part.