I've tried using:
win.configure(stack_mode=X.TopIf)
win.set_input_focus(X.RevertToParent, X.CurrentTime)
However even without any focus loss prevention on my window manager this does not work, does anyone know of another way to do this? Xlib or not.