There is the issue of the camera lenslet array that @j.stirling highlighted
The paper gives a thorough description of the cause and the effect. The camera calibration in the Openflexure software corresponds to fig 9 (b,f), corrected for white balance and vignetting but not colour un-mixing. To get the unmixing shown in fig 9 (c,d) or (g,h) requires extra information from test illumination or test targets of known colour.
As the root cause is in the construction of the Sony IMX219 sensor on the Raspberry Pi camera 2 eliminating the issue would be hard. It will be helped if the Openflexure software can work with other cameras, which is a current work in progress. Then it might be possible to find a suitable camera with no lenslet array, or with less lenslet offset. This is less common on small sensors, and using all of a bigger sensor means a much longer optics module.