The chroma preservation is taking R:G:B ratios from a linear RGB space, and applying them to data in a 2.2 gamma RGB colourspace. Even if the filmic curve made no adjustment to ‘max’, the output colour will be different to the input.
Would it not make more sense to apply the ratios in the same colour space as they came from? (i.e get the before ratios from pow(inputrgb, displaygamma) or apply the linear ratios to linear output RGB, with an appropriately adjusted scale factor as described by @Carmelo_DrRaw above).