Using bytes regular expression works fine as follows:
In [48]: regexp_1 = re.compile(b"\xab.{3}")
In [49]: regexp_1.fullmatch(b"\xab\x66\x77\x88")
Out[49]: <re.Match object; span=(0, 4), match=b'\xabfw\x88'> # <----- good !
When I try formatting the bytes sequence according to this post I fail:
In [50]: byte = b"\xab"
In [51]: regexp_2 = re.compile(f"{byte}.{3}".encode())
In [52]: regexp_2.fullmatch(b"\xab\x66\x77\x88")
In [53]: # nothing found ... why ?