What you have encountered is actually one of the necessary steps to really become "a senior developer". And congratulations, you have already passed the biggest part of that hurdle: becoming aware of the issue. There are things that are fragile, things that break when they encounter a shock. Such as porcelain, when transported. There are things that are non-fragile, things that do not break when they encounter a simi…
This assumes all criticism is made with good intentions. However that is not always the case.
(Easier to say than to embrace, of course.)