The most effective way to stop talented employees from joining a competitor is to ensure that they enjoy working with you so much that they will stay until it is time to retire.
Short of doing that, there is little you can do to prevent an exodus of talent, because employment contracts stating that an employee cannot work for a competitor for 12 months, for example, usually do not stand up in law.