This is a known issue, which is still present in UE5.
A workaround I’ve found is to create a file Config/DefaultPakFileRules.ini
.
See instructions in the Engine’s version: \Engine\Config\BasePakFileRules.ini
You can exclude folders of content like this:
[ExcludeContentForWindows]
Platforms="Windows"
bExcludeFromPaks=true
bOverrideChunkManifest=true
+Files=".../Content/<YourGame>/Folder/Path/*"
The files are stripped out post-cook.
To verify it worked, you can double-check that the files you want to exclude are NOT listed in the AutomationTool’s list of pak items in: <Engine>\Engine\Programs\AutomationTool\Saved\Logs\PakList_pakchunkX-<Platform>.txt