How do I register 'Scene' properties with Python in 2.8?
Annotations in 2.80

Not sure of the problem here. 2.8 uses annotations, currently not doing so produces a warning message.

Test code to confirm operation in 2.80

import bpy

class MySettings(bpy.types.PropertyGroup):
    # use an annotation
    lockHead : bpy.props.BoolProperty(
        name="Enable or Disable",
        description="Lock the head position of the bone",
        default=False
        )

def register():
    bpy.utils.register_class(MySettings)
    bpy.types.Scene.my_tool = bpy.props.PointerProperty(type=MySettings)

if __name__ == "__main__":
    register()
    print(bpy.context.scene.my_tool.lockHead)


Test in console:

&gt;&gt; C.scene.my_tool
bpy.data.scenes['Scene'].my_tool

&gt;&gt;&gt; C.scene.my_tool.lockHead
False

&gt;&gt;&gt; C.scene.my_tool.lockHead = True
&gt;&gt;&gt; C.scene.my_tool.lockHead
True


Trying on bpy.types.Window is an issue. The use of bpy.props is restricted to ID types.  As a rule of thumb  objects in the bpy.data collections are ID type..  Scene type in bpy.data.scenes.  There is no bpy.data.windows for the Window type.  (there is the window manager)

&gt;&gt;&gt; isinstance(C.window, bpy.types.ID)
False

&gt;&gt;&gt; isinstance(C.window_manager, bpy.types.ID)
True

&gt;&gt;&gt; bpy.types.WindowManager.my_tool = bpy.types.Scene.my_tool
&gt;&gt;&gt; C.window_manager.my_tool.lockHead
False


Only a rule of thumb test, as shown by a pose bone.

&gt;&gt;&gt; bpy.types.PoseBone.my_tool = bpy.types.Scene.my_tool
&gt;&gt;&gt; C.active_pose_bone
bpy.data.objects['Armature'].pose.bones["Bone"]

&gt;&gt;&gt; C.active_pose_bone.my_tool.lockHead
False

&gt;&gt;&gt; isinstance(C.active_pose_bone, bpy.types.ID)
False


A more robust test, If a blender object doesn't support ID properties, it cannot be used to store custom properties defined with bpy.props

&gt;&gt;&gt; C.window["x"] = 3
Traceback (most recent call last):
  File "&lt;blender_console&gt;", line 1, in &lt;module&gt;
TypeError: bpy_struct[key] = val: id properties not supported for this type