That was considered a tax loophole by the last administration so the R&D exception was allowed to expire in 2022 and only recently restored by the new admin.
R&D tax credits did not “expire". Immediate expensing expired in 2022, requiring companies to split credits across multiple years. Multiple attempts since then have tried to restore expensing (often in bipartisan tax packages), but Congress hasn’t passed a permanent fix.