in my experience it’s largely up to the individual property, which may mean it’s up to the particular front desk clerk who checks you in or the auditor who catches that something was amiss with your folio
since retiring from active Reserve duty in July 2003 I’ve had to follow travel policy for seven employers; most if not all explicitly indicated that employees were not eligible for Government lodging rates (although I’ll typically book Government rate if it’s lower than a corporate contract) ... other than official travel to two conferences in Europe, I probably have less than 15 nights outside Marriott or IHG properties, and only had one instance where a front desk clerk refused to honor my military ID as qualifying for Government rate
so back to OP’s question — regardless of whether I’ve booked on the brand website or via a corporate travel portal, I’ve received full rewards program point credit for every Government-rate stay that I’ve accumulated at Marriott, IHG, and Hilton properties in the US