Should be the same. You can replace to any location, and with modules it doesn't even need to follow GOPATH naming conventions.
E.g. clone A and fork-B into adjacent folders regardless of fork status or import paths, and change A/go.mod to include
replace original.com/B ../B
and that should work fine.
With GOPATH you would need to clone the fork into the original path. Which you can do if needed / modules don't prevent that either, but modules don't need any specific locations at all.
---
The official module doc is... huge and doesn't spell things out in an easily-usable form, so you're far from alone in your confusion, but I do think it's worth reading. I routinely find people spending way more time struggling with them than it would take to read the spec and become an expert on it: https://go.dev/ref/mod
What do you do if you’re working in a fork of the project and you need to make those changes?