I am confused by this line because according to the documentation when rendering to a render target, it is used the encoding of the render target. Is it possible that this line does nothing?
Good catch! Do you want to make a PR at GitHub and remove the line?