It's a matter of understanding the spatial predicate terminology used by the DE-9IM, which isn't always intuitive. You don't want "overlaps", but more likely mean "intersects" (i.e. ST_Intersects
).
See JTS TestBuilder to get a better understanding of the spatial predicate meanings for different geometry configurations.