According to
https://dev.mysql.com/doc/refman/8.0/en/regexp.html#regexp-compatibility
Versions before MySQL 8.0.4 used a different regular expression library (Henry Spencer regular expression library), whereas new versions use the International Components for Unicode (ICU).
The link above lists some differences between the implementations, and the one referring to your error is:
The Spencer library supports word-beginning and word-end boundary markers (
[[:<:]]and[[:>:]]notation). ICU does not. For ICU, you can use\bto match word boundaries; double the backslash because MySQL interprets it as the escape character within strings.
So this should work:
->whereRaw('episodes.title REGEXP ?', ['\\b' . $search . '\\b'])