When you apply for a mortgage, you almost surely will be asked to sign IRS Form 4506-T. The form authorizes the Internal Revenue Service to give the lender a transcript of your most recent tax return. The lender will use it, so the lender will see your tax return. The lender will look for discrepancies between what you told the IRS and what you said on your loan application.
Thus, if you lied about your income to the IRS or to your lender, but not to both, you will be busted.
If you told the truth on the loan application, but you underreported your income to the IRS, the lender will believe your tax return — and that means that your income might not be high enough to qualify for the loan that you applied for. If the lender thinks you exaggerated your income on the loan application, it won’t take kindly to the attempted fraud.
Don’t give the lender a falsified tax return; that will be detected easily. Honesty is the best policy, both with the IRS and with your lender.