I want occluded blueprints to not run code

There is a “Was Actor Recently Rendered” node that might be what you want.