There is a guy online who repairs these pretty cheap (along with EWS modules) - could just be a failing battery since the keys sync but then seem to lose range. I've sent a bunch of keys to him and they all came back working great.
https://www.bmwgm5.com/