Well, if it works in 3D as expected by you, then try to do it in 3D behind the scenes (use Z=constant for all points) and render the results in 2D by dropping the Z coordinate.
But again: the intersection between a line and a filled polygon is another line (not counting special or trivial cases). So, even in 3D, the current behavior may change in the future.
Perhaps you’re better off by using other functions to accomplish that: Get intersection of PolyData line and a plane