“Does God always protect those who do the right thing?”
Not sure. But probably in His own way. Our definition of “protect” may be different from His.
“For my thoughts are not your thoughts, neither are your ways my ways, saith the LORD.” Isaiah 55:8
That sounds reasonable.