Zera Shimshon also gives another explanation the same as the first one but explains how Hashem prevented them from properly mourning Yaakov.
He explains that the enslavement in Mitzrayim began right when Yaakov passed away however it was very mild. Therefore, this doesn’t contradict what Rashi writes in Parshas Va'airo that the bondage, enslavement and suffering began only after all of the children of Yaakov died because Rashi there is referring to severe suffering and after Yaakov died it was very mild.
Even though it was very light, Bnei Yisroel were concerned it might develop into a much more severe bondage. Since they were concerned mainly with themselves they didn't fully mourn Yaakov but mourned their own situation. The only time that the mourning for a tzaddik prevents calamities is when the mourning is solely for the tzaddik. Since they were mainly concerned with themselves their mourning didn't have the ability to annul the decree of being enslaved in Mitzrayim for four hundred years.