Hi,
As of my knowledge, there is no direct solution in standard to restrict the service price change only if the service is selected from contract. You may check the feasibility of development.
However, I have gone through the same requirement in one of our clients and since there was no development allowed in the client, I have achieved it in standard itself with an indirect approach. I have achieved it through service pricing, in which two condition types were added which was triggered in PR when there is a contract is referred. if the condition is triggered, the gross price will be greyed out, since its directly affecting the service gross price. You may try the same as well.
Regards,
AKPT