Seems like it should be closed as a duplicate, since what's happening is the supporting block goes from being a waterlogged root block to a water block, which never violates that a carpet can be placed on anything.
Seems like it should be closed as a duplicate, since what's happening is the supporting block goes from being a waterlogged root block to a water block, which never violates that a carpet can be placed on anything.