I am not an expert. Surely margin interest within the trading account, which is deducted from dividends by the broker, is allowable as an expense against the dividends.
Otherwise, it would not be fair, reasonable, or make sense, or be even manageable.