Custom line patterns do not close on correctly when applied to rectangular shape with square corners (zero rounding).
The lower left corner, x=0, y=0 in the geometry section, doesn't join the ends in a well behaved manner. Actually, all corners tend to have some issue depending upon the pattern.
I run into this too (too often!)
I wonder if this is 100% a bug or partly a 'philosophy' issue where it isn't possible to 'programmatically know" what the pattern-creator intended.
It would be interesting to compare pattern behavior between Visio and other apps that support custom patterns like Adobe Illustrator or Corel Draw.
I had thought about whether or not this was buggy, and decided that it should be treated as such. My reasoning was...the rectangle is an enclosed shape, the border/frame, is a continuous band, therefore, the custom fill should be a continuous band. I can see where this might be somewhat problematical to implement at corners, but, without rounding, each side should have a nice 45deg cut.