So glad your little baby is okay

they do make deterrents but raccoons are tough ones to deter because they are garbage eaters. Rabbits and deer shy away from blood Meal and putrescence egg solids (typical ingredients in a deterrent) but raccoons are often digging through garbages that smell like that! Eww. Some deterrent sprays will smell like cloves and peppermint and those might work on a rat or raccoon, other potential sprays/granules that might work would be predatory urine- like coyote or bobcat. They actually sell that. Live traps are an option and fish and wildlife may even come out to destroy them for you depending on how extreme they are in your area. Calling your local fish and wildlife should help you get an idea of how they may or may not support and what your local regulations are.