When the Philistines captured the ark of God, they brought it from Ebenezer to Ashdod. Then the Philistines took the ark of God and brought it into the house of Dagon and set it up beside Dagon. And when the people of Ashdod rose early the next day, behold, Dagon had fallen face downward on the ground before the ark of the Lord. So they took Dagon and put him back in his place. But when they rose early on the next morning, behold, Dagon had fallen face downward on the ground before the ark of the Lord, and the head of Dagon and both his hands were lying cut off on the threshold. Only the trunk of Dagon was left to him. This is why the priests of Dagon and all who enter the house of Dagon do not tread on the threshold of Dagon in Ashdod to this day. 1 Samuel 5:1-5.
The Israelites we’re very distressed when the ark was captured. This was nothing compared with how it’s captors felt. It is first set next to their idols, Dagon. Our God breaks their god. Then it gets worse, and the various Philistine villages start playing hot potato with the ark. Nobody wanted it.
God is never discredited, no matter how uncreditworthy his people are. He does not get His power from them. They get their power from Him. Everyone ultimately answers to Him.