Prepositions are a tricky area. Sometimes you can use only one, other times you can use lots of different alternatives. With this ‘border’ example, the one you certainly can’t use is ‘behind’ – unless you are referring to a specific point about international trade (‘behind the border’ trade barriers).
In its general usage, we don’t say behind the border. We say ‘over the border’, ‘beyond the border’ or ‘across the border’. If the place you are referring to is very close to the border you can say ‘on the border’.
So for example:
A: You live in Prudnik. That’s on the border, right?
B: Almost, it’s a few kilometres over the border.