After doing some research realized that dds_topics.yaml plays a role and in default dds_topics.yaml optical flow sensor topic is only under subscriptions and not publication.
As we are directly flashing our px4 with the pre-built PX4 firmware binary from Releases · PX4/PX4-Autopilot · GitHub , for example ark_pi6x_default.px4 we are unable to change dds_topics.yaml as we need.
In my understanding .yaml is a configuration file used also to change values for a binary instead of rebuilding when intending to just change some configuration values.
Is there a way to update dds_topics.yaml when using pre-built binaries?