Xcode Cloud is not able to access swift-gen generated file

Hi, I am using swiftgen as a prebuild command plugin in one of my internal swift packages to generate a swift file for Translations.
When using Xcode cloud to build the project, it is giving me the error, Can not find Translations in scope. It seems Xcode cloud is not able to access the generated file (The file gets generated in context.pluginWorkDirectory in prebuild command plugin and is available in my project when build locally).
Has anyone faced a similar issue? Is there any thing I can do to make it work in Xcode Cloud?