I have done the same. For xenforo to recognize the anchor, I have to redirect #anchor to &p=I actually intercept any showthread.php call that has p=xxx in it and redirect it to a proper URL... showthread.php?t=1234&page=3#post343454 for example.[/I]
You can do that with redirects to your webserver (apache or nginx).
With my changes to the 301redirect.php script to first lookup the post, the anchor then works perfect.