Even if it is realistic looking, the parents should have been more careful with a real gun in the house with a child
I'd modify that statement a little.
Precisely because it is realistic, the parents should have been
even more careful with a real gun in the house... When I was a kid my parents gave me firearm lectures just about every time I played with any sort of gun shaped object. Squirt guns (both realistic and Super Soaker), cap guns, nerf guns, sticks held like guns while I said "bang", etc. They warned me repeatedly about the danger of real guns, and there weren't even any guns in the house. In fact, I don't think I even saw a real gun until I shot a .22 rife at Boy Scout camp. My friends didn't even have BB guns.
Putting medicine, inside a child-resistant container, in a medicine cabinet is normal behavior. Generally, by the time a child has the manual dexterity to open a container like that, (and medicine should not be stored in easy-open containers if a child is going to be in the house), they're old enough to have been taught that medicine is not candy. (If that is not the case, and a parent should be keeping track of their child's development, then locking the medicine cabinet is advisable) However, setting a loaded gun on a table and leaving it unattended is
never acceptable behavior, period. It doesn't even matter if there is a child in the house. You don't run a space heater underneath curtains, you don't park a car on a hill without putting on the parking break, you don't mix bleach and ammonia, you don't mess around with Jim, and you don't let a loaded firearm out of your reach (and certainly not out of your sight).