As far as I'm aware, mpaka does not mean fence.
A fence is not a actually a boundary. If you ever get into a border dispute with a neighbour, you might have to be able to establish things like who the fence belongs to, and what side of the boundary it is on -- yours, your neighbours, or equally on both. The fence marks the boundary, and can keep people out, but it is not the boundary itself.
According to the Swahili-English dictionary on Glosbe, mpaka can mean "barrier", but it is quite far down the list of meanings, suggesting it might not be a common usage of the word.