Police corruption is found everywhere but South East Asia (similar to India and Eastern Europe) is unique in how it affects visiting tourists and foreigners so directly. Luckily it’s almost always petty and rarely a situation where the foreigner can’t easily deal with.
These corrupt actions tend to be mere scams designed to make the foreigner pay a “fee” or “toll” for seemingly legitimate purposes;
The list goes on, but they’re bogus and are often obvious when the encounter occurs. The corrupt cop just wants a few dollars and will let you go.
This is assuming you didn’t actually break the law or have otherwise given probable cause.
So just go along with it, if it is indeed a scam as it usually is. Use stealth cognizance and appear oblivious. Pretend it’s official business and hand the cop a small but reasonable “fee” to make them happy.
Be vigilant, but never forget the power they have over you, corrupt or straight, a cop is a cop.