onlinesubsystem error when packaging project

I followed a multiplayer game tutorial and created a third person C++ project with UE5.
Then,

  1. Enabled the online subsystem steam plugin and restarted the editor.
  2. Added the “OnlineSubsystem” and “OnlineSubsystemSteam” publicdependency to the build.cs file
  3. Added the configs to the DefaultEngine.ini

    Then I tried to package the project on windows platform, but I got the following errors

    I don’t know why these errors happen, also I don’t have D:\Build++UE5\XXX such folder in my local driver.
    Please help, thanks.

Did you enable the OnlineSubsystemSteam plugin as well? You can do that in the editor, search for this element in your uproject file

		{
			"Name": "OnlineSubsystemSteam",
			"Enabled": true
		}

Also I don’t think [/Script/Engine.GameEngine] is the correct section for the DefaultEngine.ini (although the documentation says otherwise Online Subsystem Steam | Unreal Engine 4.27 Documentation). In my project the net driver definitions config wouldn’t be applied unless I changed the section to [/Script/Engine.Engine]. Maybe they used to be in the GameEngine class but have been moved to the Engine class at some point but the documentation wasn’t updated to reflect that.

[/Script/Engine.Engine]
; we first need to remove the old GameNetDriver definition inherited from the BaseEngine.ini (must be an exact match!)
-NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="/Script/OnlineSubsystemUtils.IpNetDriver",DriverClassNameFallback="/Script/OnlineSubsystemUtils.IpNetDriver")
; now we can add the GameNetDriver using SteamNetDriver
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

Thank you for help.
I checked the uproject file, the online subsystem steam is do enabled.
I did not change the Engine Section, but after rebuilding, now the errors are gone.
I don’t know what is the reason for this issue, maybe It is caused by compiling.