It worked as expected using a static route with BFD.
The topology is:
Customer -------- BGP session -------- Router A -------- IS-IS -------- Router B
In router A, I created a static route using the router B interface IP address as next-hop.
set routing-options static route 192.168.66.0/32 next-hop <router B IP address>
set routing-options static route 192.168.66.0/32 bfd-liveness-detection minimum-interval 300
set routing-options static route 192.168.66.0/32 bfd-liveness-detection multiplier 3
In router B, I created the static route with the receive parameter so it answers the requests.
set routing-options static route 192.168.66.0/32 receive
set routing-options static route 192.168.66.0/32 no-readvertise
In router A, I created a condition and applied it to the BGP export policy.
set policy-options condition BACKBONE-UP if-route-exists 192.168.66.0/32
set policy-options condition BACKBONE-UP if-route-exists table inet.0
...
set policy-options policy-statement MY-POLICY term sp from condition BACKBONE-UP
set policy-options policy-statement MY-POLICY term sp then accept