How to restrict the application endpoint from loading in a browser?

Solution 1:

As Suggested by ChetanSharma-msft and as per this Microsoft document we cannot configure we app to restrict message extension.

Here are the few example scenarios where message extensions are used

enter image description here