Both Scalac and Dotty assume that synchronized takes and returns an Object after erasure.
Actually it doesn't so there's no need to box.
We could potentially leave synchronized as a polymorphic method after erasure and save a bit on GC pressure and bytecode size.