Locked rooms are pretty fungible. Some possibilities: there's another duplicate key in circulation, the son's key was stolen and then returned, the guys who entered the room with the father (technically just before the father) were both in on whatever happened and surreptitiously concealed the apparatus used to lock up, or there's something about the window latches, which the episode spent more camera time on than they appeared to deserve.
The other point of possible interest is that if this was suicide (with the intent of framing the brother) or some kind of bizarre illness, the locked room no longer matters: the victim could have locked himself in without the key. He wouldn't have needed it to enter, since the dad mentioned that the room was normally accessible to the members of the household.