I've seen a lot of discussion about pellet dunking so I just wanted to provide two ways to prevent it.
1) Switch to water bottle. For all but the most obsessive dunkers this solves the problem. Just make sure your parrot is not shoving pellets into the bottle spout. One way to prevent this is by mounting the bottle as far from the food as possible.
2) If there is just no way you can switch to water bottle or your parrot shoves food into the bottle spout, the other solution is to take water away entirely during meals. However, this method requires great responsibility and remembering on your part. If you feed your parrot just twice a day (morning and evening), then you can provide food, wait for the parrot to eat, and then offer water in a cup (or better yet leave it in the cage all day). Then in the evening, take the water away entirely, let the parrot eat pellets, and then offer water again. By removing water during feeding times, dunking is entirely averted. Just don't forget to give water again afterward.
How long a parrot can go without water will depend on species but any parrot can wait 30 minutes to complete its meal before getting water instead of food. If you leave a parrot all day with food and water, it is just too likely that it will want to play with its food merely out of boredom. So by taking that opportunity away, the problem can be averted.