You can always make an agreement to that effect, but what do you actually propose to achieve? Have you understood why the employees are leaving after receiving an increment? Are you offering an increment that makes it worthwhile for them to continue working with you?
Even if they sign an agreement, what will you do? Will any court in the country force an employee to work for you when they do not want to? Or do you intend to recover the increment amount? Will they bother to honor the agreement? At best, since they don't feel the increment is fair, they will be willing to give it up as they are obviously getting a better deal at the new company.
So what do you really want to achieve?