The easiest solution would be to cut the back of the cabinet, and use a longer tailpiece on the lav drain.
Raising the drain in the wall, without seeing it, could be a "lot of work".
Some toilets have more space behind the tank then others.
Older toilets may have needed most of the 12" to fit,
Many new toilets have more room behind.
Some as much as an inch.