What do you think of the bible saying that public virtue is not rewarded by God, only secret virtue is rewarded by God?

I know people who were secretive about their good deeds and they got very good professional lives and social lives and family lives.

And I know religious people who were loud and boastful about their acts of religion, or worship, prayer, fasting and charity, and the ones who showed off always had some sort of chaos in their lives: Whether it was health issues, shortened life spans, premature aging, constant persecution and bickering with others, mental health issues, regular backlash by enemies, severe feelings of persecution by employers, total and unbearable exhaustion trying to earn money, and tit for tat friends who only faked kindness towards them for financial gain. Many of them had to work 20 times harder than others to get the same amount of money as them.

Because the bible says God does not bless public acts of virtue, he only blesses and rewards private acts of religion and virtue that are hidden from any visible witnesses.

What do you think of the bible saying that public virtue is not rewarded by God, only secret virtue is rewarded by God?
Post Opinion