If a block producer is working due to getting a voting status, what happens if they betray the others and add fraudulent data. How is that stopped under dPOS and also what happens if I have a private network? How is that stopped then?
Blockchain data comes in the form of transactions. By design, each transaction must bear one or more signatures of the parties involved. The signatures use modern cryptography. This means the probability of one party (the rogue node) forging a signature of another (a legitimate user) is too slim to be realistically considered.
A block producing node sends all transactions to its peers. The peers will validate the signatures of the transactions. A block becomes finalized if at least 15 of the 21 active block producers accept it as valid.
So, a rogue node (let's call it Eve) can do all they want, but they won't be able to forge others' signatures, and if they try (and fail), other nodes will deny the result upon verification. As a result, the blocks produced by Eve won't be finalized, so perhaps there will be no blocks in the network for a few seconds. After that, Eve will rotate out of the current producing position, and block production among the good nodes will resume.
If Eve is in the top 21 but consistently tries to sabotage block production like that, the entities who voted for Eve will likely retract their votes soon, ultimately kicking Eve out of the top 21 and restoring uninterrupted block production.