<SettingsGroup Id="TranslationMemoryUpdateTaskSettings"> missing from sdlproj file

Related to https://community.sdl.com/products-solutions/solutions/customer_experience_cloud/language/language-developers/f/57/t/8389, when I import projects through the API, the element with id "TranslationMemoryUpdateTaskSettings" is missing from the sdlproj file, so when I try to get it via

updateTMSettings.GetSetting<string>("TmImportOptions").Value = "KeepMostRecentTranslation";
settings.UpdateSettings(updateTMSettings);

 I get this stacktrace

My.Program.Main(:0): System.InvalidCastException: Unable to cast object of type 'Sdl.ProjectApi.Settings.SettingTypes.TmImportOption' to type 'System.String'.
   at Sdl.Core.Settings.SettingsGroup.GetSetting[T](String settingId)
   at My.PackageImport.GetTmUpdateTaskSettings(FileBasedProject project)
   at My.PackageImport.ImportPackage(List`1 projectPackageFiles, List`1 returnPackageFiles)
   at My.Program.Main(String[] args)

 Is there any way to set the TmImportOptions if it doesn't exist, or do I have to manually modify the sdlproj XML file?