How to make a getter for a C++ TMap return a reference so that the TMap can be modified in BP?

Hi,
I have the following member variable:

UPROPERTY(Config, EditAnywhere, BlueprintReadWrite)
TMap<FString, float> VolumeMap;

If I make it public and then in BP I simply use GetVolumeMap node, then call e.g. Add or Clear on it, an entry is added or the map is cleared as expected (as you can see it’s a Config var, so the changes are indeed save to the config file).

However, instead of making this map variable public, I wanted to make it protected/private and create a public getter for, but such that it would return it by reference, so that I can still use things like Add or Clear on it in BP.

This is what I did:

UFUNCTION(BlueprintPure, Category=Settings) TMap<FString, float>& GetVolumeSettingsDict();
TMap<FString, float>& UMyGameUserSettings::GetVolumeSettingsDict()
{
    return VolumeMap;
}

However, when I use this function in BP, it does return the map, but Add or Clear doesn’t change its contents (I checked it by debugging in BP - the content of the map doesn’t change, and obviously no changes are made to the config file).

What am I doing wrong here?