Restricting transferability of Smart Contracts
Bitcoin script only allows the conditions under which an output can be spent to be controlled, it does not provide a method for dictating what can happen to the output once these conditions have been satisfied. The concept you are describing is called a coin covenant, the linked thread goes into some detail explaining why this is generally a bad idea.