When we update Line widgets style through web plugin API, it impacts the read-only bounds/endPosition properties. This cause line widget to switch to undesired position when connecting between 2 widgets.
Video for this behavior
Notice that the line changes position after color change
Before and after comparison of widget properties