Add-ons can call a batch draw command for lines using a surface shader.
This is not intended and polylines shaders should be used. This PR
lighten this restriction to automatically replace the shader with the
correct polyline shader, similar to immediate mode.
This change is done inside the python wrapper as internally we should
use the correct polyline shader.
For point shaders we don't have a work around in place and that needs
more discussion. Therefore this is only a partial fix.
Pull Request: https://projects.blender.org/blender/blender/pulls/138138