Maybe change their collision layers. If the world is layer 1, projectile is layer 2, enemy is layer 3. Then projectile could mask layer 1 only, and the enemy could mask layer 1 and 2. This way the projectile will ignore the enemy and continue its motion, but the enemy would detect any collision with the projectile, then have the enemy free itself if it collides with a body in layer 2.
Otherwise casting via a ShapeCast3D node or in code with PhysicsDirectSpaceState3D could be used to search the area ahead of the projectile, but the oddball cases where the enemy’s path crosses on the exact frame of collision would be a potential issue.