that is a very good question.
On my 8 inch barrel build, I just found whatever drill bit I had laying around that fit fairly snugly into the pre-existing port, and drilled it with the gas block installed (AMD mod)
It's about 4.5 inches closer to the breech that the previouse port.
Then I left a full two inches of "port to muzzel" just to be sure.
It works fine. I am sure I could have used a smaller port, but I want reliability, and the way to do that is to keep everything working strong.
Now, if I was going any shorter than that, I would deffinitely make a smaller port. like, say on a 6 inch barrel...
... I would drill a smaller port, then test, and drill slightly bigger ONLY if needed.
Or, if I was making the port to muzzle distance smaller, I would go with the same size on a 6 insh barrle.
OR say, on a six inch barrel with a 3/4" port to muzzel, maybe you would need a slightly bigger port (although I doubt it) and I wouldn't drill it bigger unless it was obviously causing some problems.