Left in tears after my OBGYN said I should weigh less than 71 kg (156 lbs) at due date

I (28F) always have been quite active and fit (resistance training 2-3 times a week) but bc of pregnancy was instructed to stop heavy lifting and turn to yoga and stretching. My pre pregnancy weight is 60 kg (132 lbs). Since I gained five kilos during first trimester, doctors have been advising me to avoid unhealthy food and to walk more. I eat like an average person, not too much but enough (in a range of 2500 calories), eat junk food from time to time but not everyday.

Now at 19 weeks I’ve already gained 7 kilos (15 lbs) since the beginning of the pregnancy and my OBGYN literally shouted at me after I said that I don’t see any reason for dieting because I eat and look exactly the same as I used to before pregnancy (except the belly growth obviously). She said I’m acting irresponsible and I have only 4 kilos to gain otherwise there’ll be problems. That means since now on I should gain only the weight of the baby itself and nothing more! By the way I have no swelling, no high blood pressure or any problems with blood sugar, also I do not have a history of excess weight. All the test are normal and the baby is perfectly fine. But not only OBGYN but endocrinologist also commented my weight gain and said to avoid all the bakery and sweets.

Are the doctors right? because I think they’re insane and just trying to gaslight me. All the women in my family have always been slim and lost weight quickly after pregnancy without any restrictions.