When you’re not looking at your target component, you’re still looking at something, be that a wall or the ground or something, and Is Valid still returns True; but since the object you’re looking at cannot be cast to InstancedStaticMeshComponent, the Set node is not called; therefore its value stays the same as it was when you were looking at the object;
If you don’t want to check the component you’re looking at by its class or its tag or something else, you can use the Cast Failed output pin to set the Hit Component variable to None or whatever you need there.