Oftentimes there are people that do good and people don't respect them (and/or rebuke them), but when they leave the place or die, people realize that they were a good person and that what they did was great and good.
There was an employee (A) in a shop who used to keep the shop organized and tidy but the owner of the shop wouldn't respect it and would rebuke him. After A left the job and the owner assigned his job to someone else B, the B wasn't so organized and the shop would always be messed up, the owner realized that the first employee A was much better and what he did was good and he was a nice employee.
Sometimes there are wise people that people don't respect much but when they die, people realize how kind and wise they were.
Is there an idiom in English to convey/express that?
Edit: I am not sure as to how my question lacks details. I have provided two examples and have explained the situation. Can the close-voters explain how else could I explain and clarify my question?