As suspected, this needed a rewrite rule.. I don’t know why post_link filter didn’t need a rewrite rule added..
function ba_rewrite() {
add_rewrite_rule('^([^/]*)?.php', 'index.php?pagename=$matches[1]', 'top');
}
add_action( 'init', 'ba_rewrite' );