SFDC implicitly will enable you access to parent fields as long as you include the ID of the immediate parent field(s) in the record collection variable. In effect, when the flow is compiled, references to lookup fields in downstream elements (like assignments) are recognized by SFDC and included in the SOQL query generated behind the scenes for the
Get Records element.
I built a trivial flow that illustrates this using a Get Record on Opportunity and showing that I can retrieve the
Opportunity.Account.Name merely by including the Opportunity.AccountId in the
Get Record for
Here's the details of each element (succinctly depicted by the debug pane) 2 Opportunities in test dataset