You can add a runtime dependency in your Build.cs configuration file. There is a constructor of RuntimeDependency that receives two parameters: InPath and InSourcePath, where InPath is the path that will be used by the game to find the DLL and InSourcePath is the path the UnrealBuildTool will use to find the DLL in order to copy it the the game’s build folder.
So in order to package the plugin DLL next to the game executable, you just need to add the following line:
RuntimeDependencies.Add(@“$(TargetOutputDir)/<“Thirdparty”>.dll”, @“$(PluginDir)/Binaries/<“platform”>/<“Thirdparty”>.dll”);
Checkout Runtime Dependencies section for more path variables: Third-Party Libraries | Unreal Engine 4.27 Documentation