I don't understand: AFAICT the OP's problem is that `raise-frame' does not
actually raise the frame. But `raise-frame' calls XRaiseWindow, which seems
like it should raise the frame, don't you think?
XSetInputFocus seems unrelated (especially since `raise-frame' doesn't call
it AFAIK).
In other words, to me it seems that if `raise-frame' requires this
_NET_ACTIVE_WINDOW footwork to work, it's a bug either in the WM or in the
wm-spec: `XRaiseWindow' should do just what it says, i.e. raise the window.
But maybe there's a rationale for this, so it's just a misfeature needed for
some odd reason. In that case I'd be interested to hear what's the reason
(and if the reason has to do with input-focus, I'll need more info to
understand what's the relationship with raise-frame).