The dotted line is part of the "normal" way of drawing the constraint, but the shape script doesn't know how to override it. So EA thinks you've overridden it with... nothing.
The only work-around I can think of is to put a drawNativeShape() at the beginning of your shape script to force the normal drawing instructions, and then superimpose your own shapes on top of that. drawNativeShape() will draw the dotted line, but will also draw the default constraint shape, so it will only work well if the shape you are creating fills the whole drawing area else bits of constraint will be poking out from underneath your custom shape. So this will look OK:
shape main
{
drawnativeshape();
setfillcolor(128,255,128);
rectangle(0,0,100,100);
}
but this will look messy:
shape main
{
drawnativeshape();
setfillcolor(128,255,128);
ellipse(0,0,100,100);
}