How to get rid of problem when lines are connected with intersected width?
There are two solutions. First solution is to use round line caps and corners. This obviously means that the outer edges are then round.
Image 1: Using rounded corners and edges eliminates the problem
Solution 2 is to restructure your shape into a different connections. Yes this means that your fills need to be separated from the line work. But such is life. But then you get hard corners. On relatively thin lines like these its not a big issue but it might be in some artwork. Extra work for sure, but sometimes the perfect end results needs special attention.
Image 2: By connecting the segments differently you can control corners.
There is a third solution and that is to use only shape inner lines But this is not without its own share of problems, as it would mean interior lines would be twice as thick as exterior ones. Waiting for the day when graph curves become commonplace.