The dual write problem can be avoided by using the transactional outbox pattern or an event-driven architecture.
These approaches can help to ensure that data is written to the database in a consistent and coordinated manner, avoiding conflicts and inconsistencies.
https://www.linkedin.com/pulse/cdc-vs-dw-patterns-part-1-diego-pacheco/