Wicket answered the why of your issue and how to solve it Google has outlined here: https://developers.google.com/workspace/add-ons/guides/debug
Essentially you have to setup a proxy so that the add on can make requests to and then those get directed to your local machine. Allowing you to develop/test much faster.