You filed this [mlir] canonicalization passes don't keep attributes · Issue #53546 · llvm/llvm-project · GitHub already right? I’ve been meaning to comment there.
This is a known issue, there isn’t a solution for this right now.
Past discussion: [RFC] Implicit propagation of dialect attributes (best effort) - #16 by mehdi_amini
And more recently: On querying an Operation's intrinsic (core) vs external/user-defined attributes