To restrict the users to apply the discount to the product while creating sales invoices, refer to the below mentioned steps:
Step 1: Click on Invite Users
Step 2: Go to Roles and Permissions >> Edit the Role
Step 3: Go to Products & Inventory >> Disable the Edit option for Products >> Click on Edit Role