If it helps, you can try clicking the cubes from the sides where it’s closer to the white surface and drag your line from there. Sometimes if you click on top of the cube it detects that the line is floating because the cubes might be a little too high or your line might be going through the cube which is also not allowed.
Thanks for the feedback! :’D