What happens if you change the go.mod file, and all imports within the project, to use
github.com/new/project instead of
github.com/old/project ?
The reason it works with a local clone is that you can put anything you like in go.mod, even
module blahdiblah/dontcare
and then do
import "blahdiblah/dontcare/foo"
within the same local filetree. The fact that the module name includes "
github.com" doesn't require any access to github, if the module name can be found within the local workspace.