Problem with the tool "Point on Object"

This parallelogram was created through a user-defined tool. This tool takes three points as three vertices of the parallelogram, finds the fourth vertex and makes a parallelogram with the "Polygon" tool. The problem is that I need to make points on this parallelogram (with "Point on Object") but the points I create get stuck on the sides. This is not happening if I create the parallelogram from scratch, only when it is created with the tool I defined.