Ragusa is a terrible home node, it transfers both to TWO end nodes (venice/genoa) both of which have considerable strong provinces and countries with ships and trade power, but also to the inland node of Wien - which means the caravan power modifier from NEARLY EVERY country downstream starts to pull trade away somewhat. Ragusa also has very little trade power itself in provinces compared to every other node around it.
For any country with a capital in the ragusa node, it is recommended to conquer either to the node of Venice or Constantinople. Both are significantly easier to hold power in. Venice because it literally cannot transfer trade anywhere, and Constantinople because it only loses power to the Ragusa node, which as mentioned is very weak.
TL DR - you're not necessarily doing anything wrong, but the Ragusa node is inherently leaky
(You theoretically could stop the leak but it involves conquering most of the venice and wien and genoa nodes anyway...)