Making ligature for Arabic fonts is outdated if you asked me. As an alternative approach, I suggest you try this:
Create three glyphs with the same allah ligature. Name the first one" lam-ar.init.allah’ [for example], the second one “lam-ar.medi.allah” and the third one heh-ar.fina.allah.
Keep the first one full width for the composition as if it was the ligature glyph. For the second and the third one put width of the glyph to zero. but don’t remove the outline until you visually placed the anchors in the right place. You can then remove the second and the third outlines before export. The second and the third allah should superpose the first one when you view the three side by side.
Now instead of writing a ligature substitution lookup, write three contextual substitution lookups. (and close each one before starting the next):
sub lam-ar.init’ lam-ar.medi heh-ar.fina by lam-ar.init.allah;
and the next lookup will be:
sub lam-ar.init.allah lam-ar.medi’ by lam-ar.medi.allah;
and the last one:
sub lam-ar.medi.allah heh-ar.fina’ by heh-ar.fina.allah;
This way each character has its own space and you can make their anchor adjustments individually like any other glyph.
You may think I complicated the things. Three lookup lines instead of a single ligature line!
But think of it this way: suppose you have also a ligature for haj. (hah-ar.init, jeem-ar.fina). Don’t you need the same ligature for jaj, jah, khaj, jakh etc.? With contextual substitution you can put all initial forms in one class, all final forms in another, the ligature form respectively in two other classes and write only two lookups to substitute the classes.
For the first initial forms you keep the full width of “haj” ligature (without the dot for jeem). For the second final forms you only keep the dot and nothing else. with zero width. So any kind of initial jeem with any kind of final jeem will produce the same composition.