Not sure if this is a bug but it feels like being unless I am missing something.
Using osnap permanently active or on demand(alt key), while drawing polylines even with the osnap “near” option deselected/disabled, it is always active and it never limits the length of the curve!