I've never done this or seen it done but here are some of my thoughts just the same that you can perhaps clear with whomever does it.
1. You can't apply shingles to insulation so you would have to install another layer of sheathing on top of the foam. Sheathing costs right now are quite a bit higher than they used to be and would be a significant cost adder (along with foam and sealing tape) to a reroofing project. Achieving the same insulation values can probably be done other ways for much less money.
2. Conventional wisdom says that shingles need adequate ventilation to dissipate heat in many parts of the country or it can lead to premature shingle wear and failure. This is generally done by venting the attic underneath the sheathing. If you are adding insulation on top of the sheathing, there would be no room for ventilation. I would assume you would have to put down some spacers that run from peak to eave on top of the insulation and underneath the bottom of the top sheathing and provide a way for air to ventilate underneath that surface. I'm not sure what that would look like at the eave or peak of the house but I'm sure there are ways to do that. Again, this would add more cost to the project. But I have read more recent research that says that ventilation is not so necessary to shingle insulated roofs as spray foam has become more popular. The added shingle temperature, which depends on climate and color, could be as little as a few extra degrees which might reduce the life by a year at most. Still, many shingle manufacturers will still void warranties unless there is adequate ventilation provided. Something to research.
3. I would assume this would fall out of the realm of a lot of roofers who just want to come in, strip and replace shingles. They would need additional tools to deal with the sheathing and fastening it through the layer of foam, spacers, original layer of sheathing and into the rafters that they might not normally use. I would expect high labor costs and maybe an extra margin padded into quotes just to deal with all the unknowns.
4. Just cost wise, I think it would be much cheaper in the long run to just spray the bottom side of the sheathing with spray foam insulation and then if you want more R-values, apply a layer of foam to the bottom side of all your rafter joists. This achieves the same R-Value as what you propose but saves on an extra layer of sheathing, the spacers mentioned above, labor, etc. while still maintaining the aesthetics of the house on the outside and your roof replacement would then be a straightforward job. This doesn't answer the question of whether or not you void shingle warranties or shorten their life expectancy since there would be no ventilation in this case either.