An effective way to do this is as follows: Use the lib.exe tool that comes with Visual Studio 2019 to execute the following command.
LIB /REMOVE:obj\third_party\abseil-cpp\absl\base\spinlock_wait\spinlock_wait.obj F:\UE4\UE_5.1\Engine\Source\ThirdParty\WebRTC\4664\Lib\Win64\Release\webrtc.lib
Replace F:\UE4\UE_5.1 with your engine installation directory.Removing spinlock_wait.obj in webrtc.lib that was causing redefinition problems fixed the bug and now I can package correctly.Note that “absl_spinlock_wait.lib” is required.You also need to remove the read-only attribute of webrtc.lib.