Python 3, 8080 78 bytes
I don't realy do many python code golfs but I thought I could give it a try
- -2 bytes: realised not(any()) is the same as all(not()) and could move the not into the r-string
def f(x):*l,=map(r'_/\~'.find,x);return 1-any((i^j//2)%2for i,j in zip(l,l[1:])) Python 3.8 (pre-release), 71 bytes
I wanted to try out the new := expression assignment
lambda x:all((i^j//2)%2for i,j in zip(l:=[*map(r'\~_/'.find,x)],l[1:]))