Solution is easy:
(1) stop letting your form drift. No one said this is easy. You actually have to concentrate and force yourself to maintain proper technique when the weight gets heavy.
(2) if you can't do this, end your sets as soon as your shoulders start to leave the bench, then add more sets. You can get very strong by leaving 1-3 reps in the tank at the same weight, so long as you do more sets to get enough volume. In other words, use less weight or less reps, add more sets.