MQTT JSON Light does not retain color after restart

I’m using an MQTT JSON Light with a state and a set topic. The MQTT broker is mosquitto. The retain flag is set to true.
This is my configuration:

light regal:
- platform: mqtt_json
  name: "Regal"
  command_topic: "regal/set"
  state_topic: "regal/state"
  rgb: true
  retain: true

All is working well but I am encountering a problem when doing the following steps in the HA gui:

  1. Switch light on
  2. Set light to a color
  3. Switch light off
  4. Switch light on

After these steps the retained message in the topic “regal/set” is

{"state": "ON"}

Due to this, when I restart my light it is switched on, but to white and not the previously set color as I want it to.

Is there a way to always send the color when toggling the state?

I am see the same behavior in 2020.

When the light is turned ON by clicking on the front end light icon MQTT sends
{"state": "ON"} and the entity rgb_color attribute disappears.
There are no RGB color states transmitted so the LEDs stay OFF.
I expected the previous RGB values selected under the : menu would be transmitted and
the rgb_color attribute values used to transmit the previously set RGB values.
Instead the rgb_color attribute is cleared.

I plan to control the RGB LED from an automation that can send a complete MQTT message so this is not a big issue to me.
However, the frontend behavior seems strange.