Egress policies don't appear to be working for me when building a pipeline from code workspaces

In a code workspace, I have set up an egress policy of an API I need to reach. When debugging or previewing the code, the egress policies work just fine, but when building the pipeline, I am getting an error that it cannot reach the endpoint. The egress policies are set up that anyone should be able to import it, so not sure what could be causing the issue. Any help is appreciated!