A game installed more than once (Steam and GOG, a beta branch, another folder) has a separate install for each. A profile uses the selected install unless you pin it in the game's settings; profiles pinned to different installs can run at once.
Bottles
On Linux, Mortar finds a Windows build inside a Bottles bottle (native or Flatpak Bottles) when the game sits in the bottle's Steam or GOG folders; the store reads Bottles. Open the game from Game select (use Choose folder… if it sits somewhere unusual in the bottle). Mortar installs the Windows SMAPI inside the bottle and Play starts the game through it.