get_the_ID() can only be used inside the loop, see the WP Codex
Using this function for the <body> tag would usually be outside the loop, so there is no telling what value is actually being returned.
When you’re assigning classes you’ll need to get the post id using some other method.
I’d probably use is_single() and/or possibly get_queried_object()