Do I depreciate and claim ordinary expenses while rental property is vacant for 2 years
If you took it out of service.....it wasn't available for rental use.....then depreciation stops and you cannot deduct ordinary rental expenses. There's an exception when a property is temporarily idle as shown in IRS Pub 527 but 2 years is a long time and might not be considered "temporarily idle".
Continue to claim a deduction for depreciation on property used in your rental activity even if it is temporarily idle (not in use). For example, if you must make repairs after a tenant moves out, you still depreciate the rental property during the time it isn’t available for rent.