According to the title and the script you're drawing a rectangle. According to the accompanying text you're drawing a line. What is it?
The color of the line, although fed Color.black, draws as white.
I cannot reproduce this, here's my code and it's running fine:
export (Color) var window_color : Color = Color8(0, 0, 0, 255)
func _draw():
draw_rect(Rect2(Vector2(0, 0), Vector2(200, 200)), window_color)