In my case this was caused by problems:
1. before you run rosdep you have to source your environment with "source /opt/ros/foxy/setup.bash"
2. If there are still some packages remaining (happens for me since if I use JetPack 5.1.1, but doesn't using Jetpack 5.0.2), simply install them manually for example "geometry_msgs" with "sudo apt-get install rod-foxy-geometry-msgs" and just do that for every package that still throws the error