Of course the fuse should be very close to the source in order to protect the cable. But you need to have the shunt first then the fuse immediately after. They can even be in the same box installed just next to battery positive terminal.
The shunt needs to be first (connected directly to battery+ terminal) then the fuse immediately after the shunt.
If you install them the other way around when the fuse fails the current shunt amplifier and possibly even the microcontroller will also fail as the voltage on the shunt and thus on the shunt wires will be either negative (so below battery- level) or high voltage positive hundreds of volts at the moment the shunt is disconnected from battery+.
So the requirement will still be meat if the shunt is connected to battery+ and the fuse connected to shunt as it will still be close to battery+ and protect the cable.