Yes. Effects that occur “when” an event happens take priority over effects that occur “after” an event happens.
A “when” ability occurs at the moment of the event and typically modifies or replaces it. An “after” ability occurs immediately after the event.
LRR v2.0 (base game / Prophecy of Kings); specific card abilities may override the general rule.