Active Learning of Deterministic Transducers with Outputs in Arbitrary Monoids (Logical Methods in Computer Science, 2025)