The issue was the Directional Light had been baked, which remains after the actor is deleted until lighting is rebuilt. In the first screenshot, the shadows show the preview text, which means it was casting whole-scene shadows and was not set to use CSMs, meaning it was a Static/Stationary Directional Light. But in the second screenshot, the light had been removed so the preview/dynamic shadows were no longer there, but the static/pre-baked lighting and shadows remained.
If you want to get rid of baked information, you can do a quick light bake with World Settings > Force No Precomputed Lighting enabled. Once it’s checked, you can rebake which will remove all Lightmap information. All Static/Stationary lights will appear disabled, but if you click on them and disable/enable they will appear as unbaked and dynamic until the next light bake or you change the mobility. Uncheck the Force No Precomputed Lighting option before you bake again.