You don't deduct taxes for Traditional IRA contributions as the title of your question says; in some circumstances, the law permits a taxpayer to deduct the Traditional IRA contribution from gross income is arriving at the Adjusted Gross Income (AGI) which is what can be subject to taxation (subject to additional rules). Taxpayers in this fortunate situation thus don't pay income tax on their Traditional IRA contribution since it is not part of their AGI at all, and thus not taxed at all.
The IRS doesn’t care when the contribution was made and figuring out whether you can deduct the Traditional IRA contribution is done at tax time (and might be the subject of considerable doubt for some folks at the time when they are making the IRA contribution). You are eligible to make a contribution to your Traditional IRA if you have sufficient earned income, but whether you can deduct the contribution is determined later and that you were between jobs at the time of making the contribution is irrelevant. So, what if you have made a contribution to your Traditional IRA for 2020 and discover (say in February 2021) that you will not be able to deduct it? Well, one option is to ask the IRA custodian to return the contribution (and all earnings therefrom) by April 15, 2021 (or whenever Tax Day is in 2021) and that IRA contribution is treated as never having been made. Or, you can leave the contribution there as a nondeductible contribution to your Traditional IRA. If you choose this latter option, be sure to file Form 8606 with your tax return to tell the IRS that you have made a nondeductible contribution to your Traditional IRA, so that years down the road when you start taking distributions from your Traditional IRA, you don't have to pay taxes on that money; it's already been taxed. Many people feel that this option is too much hassle, not just for right now but for years down the road when all this will be a faint memory, and just opt for Plan A and back out their IRA contribution for that year.