I found a workaround. It turns out it doesn’t interpolate the colors added to the transfer function. The workaround is to put more colors manually in the transfer function according to the original interpolation:
for val in np.linspace(0, 1, 100):
color = colorTransferFunction.GetColor(val)
colorTransferFunction.AddRGBPoint(val, *color)