Different regex engines behave in different ways.
Behaviors for unmatched capturing groups differ. In JS, a backreference to an unmatched capturing groups is equivalent to the empty string (epsilon), but in Python it's equivalent to the empty set (as in, reject all).
$ /^(?:(a)|b)\1$/.test("b")
true
$ re.match(r"^(?:(a)|b)\1$", "b") is not None
False
This behaves differently because the captured text is reset in JS but not in Python.
$ /^(?:(a)|\1\1){2}$/.test("a")
true
$ /^(?:(a)|\1\1){2}$/.test("aaa")
false
$ re.match(r"^(?:(a)|\1\1){2}$", "a") is not None
False
$ re.match(r"^(?:(a)|\1\1){2}$", "aaa") is not None
True