The problem was that calculating the angle was reliant on previous mouse coordinates, which did not update to match snapped-to vertices and edges. This solves the issue by updating mouse coordinates in knife_find_closest_edge() and knife_find_closest_vertex(). Additionally, when angle constraints are enabled, edge/vertex snapping is now prevented.