I can't reproduce that on any database I have
SQL> select banner from v$version where rownum = 1;
BANNER
-----------------------------------------------------------------------------
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
1 row selected.
SQL>
SQL> select x from
2 (
3 select 'A_Babc' x from dual
4 union all
5 select 'A$Bxyz' x from dual
6 )
7 where x like 'A~_B%' escape '~';
X
------
A_Babc
1 row selected.
SQL>
SQL>
SQL> select x from
2 (
3 select 'A_Babc' x from dual
4 union all
5 select 'A$Bxyz' x from dual
6 )
7 where x like 'A\_B%' escape '\';
X
------
A_Babc
1 row selected.
SQL> select banner from v$version where rownum = 1;
BANNER
------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
SQL>
SQL> select x from
2 (
3 select 'A_Babc' x from dual
4 union all
5 select 'A$Bxyz' x from dual
6 )
7 where x like 'A~_B%' escape '~';
X
------
A_Babc
SQL>
SQL>
SQL> select x from
2 (
3 select 'A_Babc' x from dual
4 union all
5 select 'A$Bxyz' x from dual
6 )
7 where x like 'A\_B%' escape '\';
X
------
A_Babc
SQL> select banner from v$version where rownum = 1;
BANNER
-----------------------------------------------------------------------------
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
SQL>
SQL> select x from
2 (
3 select 'A_Babc' x from dual
4 union all
5 select 'A$Bxyz' x from dual
6 )
7 where x like 'A~_B%' escape '~';
X
------
A_Babc
SQL>
SQL>
SQL> select x from
2 (
3 select 'A_Babc' x from dual
4 union all
5 select 'A$Bxyz' x from dual
6 )
7 where x like 'A\_B%' escape '\';
X
------
A_Babc
Are you sure that you don't have an errant space in there anywhere ? eg
SQL> select x from
2 (
3 select 'A_Babc' x from dual
4 union all
5 select 'A$Bxyz' x from dual
6 )
7 where x like 'A\_B%' escape '\ '; -- trailing space
where x like 'A\_B%' escape '\ '
*
ERROR at line 7:
ORA-01425: escape character must be character string of length 1
or running it in some environment where the backslash is special to the environment itself (eg unix shell)