Hello,
I am not sure, if I understood your problem right. We had the issue, when loading RGBI-Images, that Agisoft Metashape recognized that there are four channels, but did not recognize and interpret the infrared channel as such (This was recognizable when opening the "set primary channel" - where the infrared-channel was not named). We ran this python-script, so it worked.
import Metashape
for sensor in Metashape.app.document.chunk.sensors:
sensor.bands = "Red", "Green", "Blue", "NIR"
So it was only the problem of naming the NIR channel.