Re-map tracked placeholder spans onto a transformed copy of the text.
Submission rewrites the draft before the display placeholders are
stripped from the model-facing text: whitespace is trimmed, collapsed
pastes expand back to full content, dropped paths become placeholders,
and a mode prefix may be prepended. Every one of those shifts character
offsets, so a placeholder_span captured against the draft would be
stale by the time strip_media_placeholders consumes it — silently
stripping the wrong occurrence when a user-typed duplicate is present.
Re-mapping each span through the same before/after diff keeps it pointing
at its own display token in text. Spans that cannot be cleanly mapped
become None, degrading to the token-count fallback rather than a wrong
strip.