Did you say different? My browser renders those "different" examples identically:
They are definitely encoded differently, because a search for ه will only highlight one of the two:
So what's going on?
Arabic and related scripts type characters differently depending on their position in a word. Let's just consider the plain ﻩ (h) for a moment: