Real estate commission is never a tax deduction. Instead, it is an adjustment to your cost basis. On commercial property, your cost basis is the basis for depreciation, and it affects your capital gains when you sell. In other words, if you buy an apartment building for $500,000 and you pay $30,000 in commission, you record your cost basis as $530,000. (There are a few other taxes and fees that also can be added to your cost basis, see here for more.
https://www.irs.gov/forms-pubs/about-publication-523
https://www.irs.gov/publications/p551
https://www.irs.gov/taxtopics/tc703