I did a little digging but I should first warn you that this is the first time I’ve tried to delve into the web interface of Duplicati. What you tried would have been the first thing I tried, too.
However, I noticed that Angular is involved here. I have zero prior experience with Angular. From what I can tell, the ng-model=“$parent.Port” piece is the variable that can both be the default value you see, as well as holds the value that is entered. (See Angular ng-model Directive). What I couldn’t figure out is the appropriate place to set that variable. ngax/scripts/directives/backupEditUri.js seems promising (search for scope.Port) but I didn’t dig into what “parts” is or where it comes from.