Doesn't look like the Context Menu will let you define which direction the menu should flyout. If you have the context button on the right hand edge of the screen, and youw ant the menu to align along the right edge of the button, this isn't possible?
The original Fluent UI control has the ability to define the direction (top or bottom, left or right), e.g. Bottom Right Edge.
https://developer.microsoft.com/en-us/fluentui#/controls/web/contextualmenu