The rain does fall on the righteous and the unrighteous, as does the sun rise on both (Matthew 5:45 78, 83NIV).
And these things are not necessarily to be construed as negative. Read the context for 5:45.
That said, there are times when the L-rd does not make a distinction in the execution of His judgments (decisions).
The first three of the fractal of 10 in Exodus 6:14-12:30, were judgments that occurred and affected the entire land of Egypt. Scripture never says that Goshen was protected from those realities.
It is only with the flies that the L-rd made a distinction with Goshen.
There are going to be times where the L-rd permits national judgment to affect us, or even negative things to affect our situations.
The question is:
What is your response to pain/difficulty/testing/refining/hard realities/problems?
Do we lean more strongly into Him and do we look at how we can partner with Father to bring productivity out of nasty or incovenient times, or do we stew and reject Him.
There are some revelations that can only be ingrained into our fiber through the fire of testing.
And there are some refinements that sre non-optional Isaiah 54:1-16) if we want those weapons formed againdt us to not prosper.
If we refuse to go through certain trials, then there will be certain weapons formed against us that will prosper.
You cannot have Isaiah 54:17 without embracing everything that comes before it.
You may need to endure blood in the waters, frogs, and lice, of you want to have protection from the locusts, hail, and darkness.