ForwardDiff: Error ForwardDiff.Tag How to transform a Dual Type to a Float

Yes, this is to be expected. Please reread the above:

Generally, you need to keep the dual information, and preallocate arrays accordingly. It is hard to provide more specific help without an MWE.