This was a case of missing relation tagging update.
The update was functional only after something else
tagged relations.
The relation update needed to be added in both the
Image texture node RNA function (for manually changed
images) and in the add painting slot operator.
Pull Request: https://projects.blender.org/blender/blender/pulls/140270