I was able to create a "Duplicate Mask" command using this code.
local LrDevelopController = import "LrDevelopController"
local maskId = LrDevelopController.getSelectedMask ()
if maskId == nil then return end
LrDevelopController.duplicateAndInvertMask (maskId)
local maskId = LrDevelopController.getSelectedMask (maskId)
LrDevelopController.invertMask (maskId)
This workaround works BUT the resulting Mask is still bearing the suffix "Inverted" BUT obviously tis not inverted.
Also history step states Duplicate and Invert (Name of the Mask) but again that is false.
In this case the Step should at least state the usual generic SDK step "Camera Raw Settings" or "Multiple Settings"
Direct LrDevelopController.duplicateMask () would give us the correct result.
I am not skilled enough to to create a code that sets a Mask with the correct suffix OR even allow to assign a custom name to the newly created mask but I think you know how to do it.