You must maintain continuous residence to travel outside the UK with a dependent visa. Avoid long trips that might make it look like you no longer plan to live in the UK. Usually, staying outside the UK should not exceed six months a year, but this can change based on your situation. As your dependent visa needs to be valid for your whole trip, keep your BRP and be aware that being away for a long time could affect future applications for ILR.