It's a straight CTRL+A CTRL+V copypasta so yeah it's identical.
Having any mods in the mod folder whatsoever was giving this error, hence my trying to put them in after loading. I'm not completely new to modding, just modding Minecraft, so I knew to try one thing at a time if it wasn't working.
As of today though, I think I'm just going to have to wait a while anyway to be able to play using Forge-based mods because I was reading that I'd have to switch Forge and all my mods to older versions to be able to use shaders since Optifine doesn't have a version out yet that supports Forge for 1.19, and I can't play at all without shaders anyway (I get headaches trying to play without any).