I thought that defining a dictionary as a constant meant you could change the contents of that dictionary by never assign a different one.
When declaring a dictionary with const, the dictionary itself can still be mutated by defining the values of individual keys. Using const will only prevent assigning the constant with another value after it was initialized.
source: https://docs.godotengine.org/en/stable/classes/class_dictionary.html
I'm getting an odd error when assigning values to a dictionary defined in this way.
As shown below, I have an autoload Globals singleton containing a constant dictionary named SSSM_GLOBAL_BLACKBOARD.


I assign a new keypair to the dictionary but Godot (v3.5.1) immediately throws an error about "invalid set index..." even though it did in fact add the value, as shown in the object inspector.
If I change the definition of SSSM_GLOBAL_BLACKBOARD from const to var, it works as expected. Or, if I test this using the same const dictionary assignment locally in a script, that works fine too. So it looks like this is something funky about doing it in an autoload script.