Seems like you might be trying to have it both ways here. You assert Job is "living in sin" and yet simultaneously "upright" still. So by your metric, it appears God us punishing Job with the suffering to punish and correct his fearful state of being?Actually he did because walking in fear is a sin. See Revelation 21:8, and also notice how many times in scripture the Lord commands His people to FEAR NOT! That's not a suggestion, it's a command.
The hedge of protection God had put around Job came down because he started walking in fear concerning his children being scared that his children were going to curse God and die which is exactly what happened to them
Job tells us what he feared came upon him, so he admits that he started living in fear.
However Job was heart right before the Lord and I don't think he got in to fear maliciously or knowingly being fearful so because of this the Lord considered him to be upright.
They does not mean though that Job is not going to reap corruption for getting in to fear. Now days we have the whole counsel of God in printed form (the Bible) which Job did not have at that time so where there is no law, there is no transgression (Romans 4:15)
I see your point about how Job says what he fears has come upon him (Job 3:25) -- however, I don't think it's the same kind of fear you are thinking of as in Rev 21:8. The words in Job 3:25 are the Hebrew words Strong's #6342. pachad and Strong's #3025. yagor which have more to do with an expression of "dread". For example, Bob woke up Monday morning dreading to go to work. It's more of an expression of saying that you would hate if such-and-such were to happen to you.
Now compare that with Strong's 3373. yare. This is the word used when it says Job "fears" God and shuns evil. Job has his fear properly aligned with the Almighty. Contrast this with Jacob, for example, who had done his brother Esau wrong. When Jacob knew Esau was on his way, he "feared" (yare) Esau. You might say in this moment that Jacob "feared" Esau more than God, unlike Job who feared God and shunned evil.
Furthermore, God clearly states in Job 2:3 that Job's suffering is "without cause". So if you believe Job is suffering because of his supposed "living in fear" that would contradict God's assessment of Job and his right standing before God.