I have tested it but it leads to two other problems. It works fine to draw a straight line but:
Can not figure out how to delete part of a line (eraser). This is easy if the line consists of several different objects.
I have a player who has the behavior Physics 2. Although I add behavior Physics 2 to shape painter, it is not working using the drawn line as a platform. If I draw a line with sprite and add physics 2, my player can go on the drawn line. See this post: Add behavior platform to newly drawn object?