These are exposed to Mascript as the following: "isSelectionFrozen()", "freezeSelection()" and "thawSelection()". There is also a toggle command: "max spacebar"
The feature is referred to as alternatively "frozen/thawed", "Lock Selection Set" and "Selection Lock", and of course "spacebar".
There are several threads asking for a way to implement this functionality, while this search returns zero results: https://www.google.com/search?q=%22selection+lock%22+%22isSelectionFrozen%22
Suggested solution: Consistently name the functionality (The popular and simply descriptive term is "selection lock"), update the relevant functions and consolidate the documentation.
References:
https://help.autodesk.com/view/MAXDEV/2022/ENU/?guid=GUID-2C42EF48-5949-4EC9-A067-EBE1267CCBFD
https://help.autodesk.com/view/MAXDEV/2022/ENU/?guid=GUID-A96857E7-73FE-4F42-BE71-E8185356F4C9
https://www.google.com/search?q=maxscript+%22selection+lock%22&ei=dZiCYYmbE5iCjLsPzqmEoAw&oq=maxscri...