Cat doors are usually too small for unwanted visitors, such as raccoons, to use. If you’re concerned about this, it’s a good idea to lock the door at night, when racoons and other pests are most active.
If your main concern is other cats, investing in an electronic door that only allows your pets to enter could be the best solution.