OK, if the executable command works then that suggests the problem is just the msbuild command locating the msbuild binary and nothing more complicated (I was starting to wonder if there was something else in the environment that caused a different msbuild to run). I'm not sure why but it seems the msbuild.bin property is not making into the context, perhaps it is defined in the wrong spot, the resource is not imported as it is not required, or perhaps another resource or msbuild.bin definition is overriding it. You could check the implicit env.txt artifact for this command for more clues -- it should show the value of msbuild.bin (if any, also set as PULSE_MSBUILD_BIN), and it will also show the PATH which may be interesting.
Note you can force a specific msbuild exe even when using the msbuild command by specifying the full path to the exe in the msbuild command configuration using the "custom msbuild executable" field. If this field is set it is used directly and no further logic is used to find msbuild.