As a person who has experienced such a thing personally, I have a deep understanding of that feeling, and sometimes I even feel wronged and want to cry, so I made changes later, and the leaders will appreciate you more, but I should also pay attention to the occasion. You must speak when you should, and control yourself when you shouldn't.
I used to work as a technician in a mechanical processing company. Because the factory equipment is aging, the company decided to introduce a batch of new equipment. After the new equipment was installed, our technicians were urgently transferred to the production line to debug the equipment. Because I like to do it, I feel itchy when I see so many new equipment, so I bury my head in the workshop and work hard, while my colleagues in the same industry keep complaining.
He said that he should have blown out the air conditioner in his office, but now it's really unlucky to be sent to this place to raise him, so he refused to do it and wandered around the workshop alone. Later, when the equipment was almost debugged, I thought of going to eat first and then coming back to continue my work.
However, when I went back, I found the leader praising my colleague. It turned out that after debugging the rest, he signed his name on the machine and went to the leader to take credit. I was really in a good mood.
So, from then on, I understood that if I did it myself, I must take the initiative to express it, otherwise it would be really useless.