Consider the Girsanov density $$\exp\left(\int_0^Tf(s,B(s))dB(s)-\frac12\int_0^Tf^2(s,B(s))ds\right)$$ Is there a notion of "mode" of this density?

For example, is there a continuous path $z(t)$ with $z(0)=0$ that maximizes the functional

$$z\mapsto \exp\left(\int_0^Tf(s,z(s))dz(s)-\frac12\int_0^Tf^2(s,z(s))ds\right)$$

This is the same as maximizing the functional

$$z\mapsto \int_0^Tf(s,z(s))dz(s)-\frac12\int_0^Tf^2(s,z(s))ds$$

I tried taking a functional derivative but it gets a bit messy. Can you relate the maximum of this functional to the mode of the drift?