Maybe? What if it was a one time manual test harness? What if it was a migration for a new client that has since quit? There is a pretty wide range of tasks a developer can do.
With a startup you're running a search function. The code you hired the developer to write often does stop working because you've been forced to pivot as you search for product-market fit.
Do you want hiring people to be considered as an investment?
I think that might have a lot of unintended side-effects.
If we spend $1M in year one to build a platform, we will surely spend more than $1M in year two maintaining and extending it, and keep doing that until almost the day we finally abandon it. Depreciation might make sense when the actual investment was heavily front-loaded (compared to the revenue) but in our industry it almost never is.