In IOS-XR, you can use the BGP `table-policy` to prevent routes from being installed in the main RIB while still announcing them to BGP neighbors.
Cisco's docs on this feature aren't great, but here are some links:
* <
* <
As you asked about Arista EOS and Cisco NX-OS in a follow-up comment:
* NX-OS has `router bgp
* Arista EOS has `router bgp` `bgp route install-map