How to package a plugin dependent on another plugin?

Hi, resurrecting this because in UE 5.4 copying the depended-on plugin to the Engine/Plugins/ folder does not work. It will produce the following error:

Expecting to find a type to be declared in a module rules named ‘AdditionalPlugin’ in ‘UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null’. This type must derive from the ‘ModuleRules’ type defined by UnrealBuildTool.

Are there instructions on building a plugin using Automation Tool (with the “BuildPlugin” command) that depends on another plugin?