How to change color of a Material of a Mesh without changing shade property?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By IWannaWin

I am currently trying to change the color of my Mesh like so:

var mesh_node = get_node("MeshInstance")
var material = mesh_node.get_surface_material(0)
material.set_albedo(color)

And this works to a certain extent.
The color changes successfully, however afterwards the shade doesn’t load anymore.
As if flags_unshaded = true, this is however not the case, I printed flags_unshaded and it was still set to false.

How can I fix this?