If you use JetBrains Toolbox, then memory changes must be set inside it:
- Go to the app settings in the toolbox list
- Change Memory heap size option within Configuration section
Otherwise all the changes in the IDE itself or inside vmoptions file just don't apply.