Shouldn't corporate tax be calculated based on EBIT instead of EBT? When I was studying Corporate Finance in university, I was surprised to learn that it is more advantageous for corporations to take more debt (even if they don't need to) because it creates tax shield which leads to a gain for equity holders.
This feels like a distorting incentive. Therefore, wouldn't it be optimal to tax corporations based on earning before interest and taxes rather than based on earnings after interest?
Indeed the debt tax shield is distorting. Any policy that will essentially distort prices to favor A over B will lead to too much A and too little B. So such differentials are (almost) always distorting (unless you actually want less B and more A due to externalities).
Here the tax deductibility makes debt cheaper compared to equity. We know this is distorting from the Modigliani-Miller theorem. It states that a company's capital structure is not a factor in its value, so it doesn't matter how much debt or equity they have. However, the theorem holds in perfect markets without taxes. As you learned, taxes destroy this result.
So what can we do?
We need to not influence the price (cost) comparison between debt and equity in any way. So this leaves two options:

Limit (remove) the tax deductibility of debt (as you propose).
Allow for the cost of equity to be equally tax deductible. This proposal is known as the allowance for corporate equity (ACE).

Both have been tried in different countries.
The issue with the first one is that you are asking firms to pay taxes on money they may not have. Suppose the tax rate is 10% and a firm has EBIT of 10\$ and interest of 10\$. The firm has no money left after paying its interest, but it now owes the Government 1\$ (10% of the 10$ EBIT). Where is the firm supposed to get this money? Borrowing could be difficult as they can barely repay their current debtor's interest. If the firm pays the full interest, it cannot pay the Government taxes and is now essentially in default. If the firm pays the Government first and does not pay interest to its creditors, it is also in default. We don't want that either. It's counterproductive, since one point of removing the tax shield was to reduce debt and default risk in the first place. So eliminating the tax shield would be impractical, but one could try to limit it.
The main issue with ACE is the potential revenue loss. The IMF estimates that if the allowance were given to all equity, corporate income tax revenue would fall by 5-12 %. (I am borrowing this excellent link from a great comment by sba222).
Side note: You propose taxing earning before interest and taxes, but note that all taxes are on earnings before taxes, so its just &quot;EBI&quot; that we're talking about.