It may be the same CPU (even if were the K version), but it won't be able to run at the same speed as in a tower.
The cooling apparatus in tight enclosures is a compromise (compared to the cooler you could use in a tower).
ie: If you were running an 8700k in a tower, you could lock all six cores at 4700MHz.
You can't do that with the 8700 (non K version). Even with the 8700k... in that all-in-one enclosure, the cooling isn't adequate to run all six cores at 4700MHz. The CPU's performance is throttled to keep temps down.