Distinguish Selected from Current
You need to separate content marked for action from content marked as the master record. That is, you need to functionally and visually distinguish selected content from the current record. The current record is the master record for the detail list. There is always exactly 1 current record for a given master list. Selected content is what the user has explicitly highlighted for action. It may be master record or a detail record. It may be multiple records in a list, assuming you support multiple selection (you should). It may not be a record at all, but a field in a record or a portion of a field (e.g., highlight text in a text box), assuming you support edit-in-place (you should). Maybe it’s even multiple fields. There may be nothing selected at all (e.g., when the user is typing in a text field).
No matter what is selected, how many are selected, or even if nothing is selected, there is still always exactly one current record per master list. There has to be –you are always showing the detail list, so you always have to show what it belongs to. This is why selected and current need to be functionally and visually separate, even though it represents an additional complication for your users. The selected record often is the current record, but it doesn't have to be.
The Menu Acts on the Selected
Not trivially, separating selected from current also solves your problem. You have one menu and it operates on the selected content (which is the definition of selected content). The current record is irrelevant. For example, the user can use the same Copy menu item to copy one or more master records, or one or more detail records, or one or more characters from a text box, and one or more fields. All that matters is what’s selected.
(BTW, for commands on the view of the list as a whole, e.g. filtering, I recommend you do have a separate menu for each list. This is because the menu items often also show the settings of the view, e.g., what is being filtered, and the user should be able to see these all the time).
UI for Current and Selected
Visually, you can indicate the selected content by highlighting (e.g., reverse-video or shading), and indicate the current record with a marker in the left margin.

You may also try including a dotted box around the current record, consistent with how the list boxes indicate the item with focus during keyboard use (especially if you do not have edit-in-place, in which case, the current record is the item with focus in the master list).
Functionally, the user sets the current record by clicking anywhere on a master record (e.g., clicking a checkbox in the record, or clicking in a text box to edit it). The master record is the record the user most recently clicked on in the master list. By default, it’s the first record in the list. If you do not have edit-in-place, the selected record(s) is/are the record(s) the user most recently click on from either list. If you have edit in place, you need to functionally distinguish selecting an entire record from setting focus or selecting within a record (e.g., to copy text from a text box). I recommend an “object control” in the left margin to handle actions on an entire record.