It works. Look at all the military rifles with stock enclosed barrels.
It alters the harmonics of the barrel and would have to be accounted for when working up a load. Also, depending upon the rifle, it will also impact the POI when the barrel heats and expands.
Floating removes these difficulties.