The file B is in a sort of semi-closed state, there is no active window on the client, but FMServer still has the client as connected and is ready to go as soon as a new call is made from db A to db B.
You can see the difference in the top level menu Window: currently open windows will show directly in the dropdown, open but hidden files are in the side menu Show Windows.
The only way to really disconnect is to close down FMpro client.
But why bother? why would you want this closed when the user is still active in db A?
As long as there is anything in the visible window which uses data (for calcs or anything at all) from the second file, both files must remain open.
However, scripting can be used to hide the window, or open the file as Hidden before calling/going to the layout which uses that data.
In those cases you can manipulate the unwanted window to not be visible to users, unless their menu sets allow them to go exploring via the Windows pull-down menu. That menu can be removed or modified using Custom Menus (requries FM Advanced to create/edit Custom Menus).