CLI/developer tools in general often lose or forget permissions because they aren't shipped as proper signed Mac app bundles, so the OS has no stable identity to attach the permission grant to. You might find that even if you click allow, that gets forgotten too sooner or later.