Query by regex not working in transaction

Idk, we need an expert. @MichelDiz ?