(Leetcode) Minesweeper game
An M field is never pushed. It may only happen as a result of an unfortunate click. Testing for board[r][c] == 'M' in the loop is a waste of time. Test it once, if board[click[0]][click[1]] == 'M', before the loop.
Similarly, you should not bother with neighbors if the field is not blank. A test for board[r][c] == 'B' happens too late. As implemented, for other fields code still compute neighbors - and does nothing with them.
The tests for 0 &lt;= dr &lt; m and 0 &lt;= dc &lt; n may also cause performance issues, and do not look Pythonic. Ask forgiveness not permission, e.g.

    try:
        if board[dr][dc] == 'M':
            mines += 1
    except IndexError:
        pass

Quite a few fields are pushed and inspected multiple times. I am not sure wether it is a bottleneck; however the right-hand and scanline methods of flood fill algorithm do worth investigation.