The "Expand to open folder" option, when enabled, means that the left pane (the Navigation pane) will expand it's view to match the folder that has been opened by double-clicking folders in the right pane.
It sounds like you're looking for a right-click "expand all" option. That would not make sense in the context of the file view in the right pane, but does make sense for the the Navigation pane, since it is a tree view.
For reasons unknown, Windows does not provide an "expand all" right-click option when you're in the Navigation pane, even though it has that functionality built-in. It's available only via a shortcut key. If you have a full size keyboard, the shortcut is easy enough to use. It's Numlock-*. But, if you have a laptop like my Dell XPS, it's the stupidest choice for a shortcut key ever devised. I can only get to that key by bringing up the Windows virtual keyboard!
Here's a list of the keyboard shortcuts:
P.S. I don't know why you show a screenshot of a right-click on a DLL file. I don't see what that has to do with expanding a folder. But if you want Defender to scan an entire folder (and all of its subfolders) just right-click the folder (not a file) and select "Scan with Microsoft Defender". There's no need, in that case, to pre-expand the folder.