diff --git a/core/lib/Drupal/Core/Form/ConfigFormBase.php b/core/lib/Drupal/Core/Form/ConfigFormBase.php
index 7a200baf86dc532d6b3a06b99e4a2584e169a093..0bcfbe28981f71a5989d1a707d06fd54ca48f4a2 100644
--- a/core/lib/Drupal/Core/Form/ConfigFormBase.php
+++ b/core/lib/Drupal/Core/Form/ConfigFormBase.php
@@ -192,11 +192,6 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
           $property_path = rtrim($property_path, '0123456789.');
         }
 
-        if ($property_path === '') {
-          // There is a map to a non-existing config key. Try to work backwards.
-          $property_path = $violation->getParameters()['@key'] ?? '';
-        }
-
         if (isset($map["$config_name:$property_path"])) {
           $form_element_name = implode('][', $map["$config_name:$property_path"]->elementParents);
         }
diff --git a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/ValidKeysConstraintValidator.php b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/ValidKeysConstraintValidator.php
index 63562f5e80e91bac7abcdf77c343f226d791cadc..5b52e7c59676c6dcc0c74a702ad30e023faf9d40 100644
--- a/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/ValidKeysConstraintValidator.php
+++ b/core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/ValidKeysConstraintValidator.php
@@ -35,7 +35,11 @@ public function validate(mixed $value, Constraint $constraint) {
       $constraint->getAllowedKeys($this->context)
     );
     foreach ($invalid_keys as $key) {
-      $this->context->addViolation($constraint->invalidKeyMessage, ['@key' => $key]);
+      $this->context->buildViolation($constraint->invalidKeyMessage)
+        ->setParameter('@key', $key)
+        ->atPath($key)
+        ->setInvalidValue($key)
+        ->addViolation();
     }
   }
 
diff --git a/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockTest.php b/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockTest.php
index ad0086be0f7cf7a86c805287162a4c53ea40feb8..b138ee94fbe5259a5199c2a6aad5b07b7c0c4ad1 100644
--- a/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockTest.php
+++ b/core/modules/block/tests/src/Kernel/Migrate/d6/MigrateBlockTest.php
@@ -310,8 +310,8 @@ public function testBlockMigration() {
     $this->assertCount(4, $messages);
     $this->assertSame($messages[0]->message, 'Schema errors for block.block.block_1 with the following errors: 0 [dependencies.theme.0] Theme 'bluemarine' is not installed.');
     $this->assertSame($messages[1]->message, "d6_block:visibility: The block with bid '13' from module 'block' will have no PHP or request_path visibility configuration.");
-    $this->assertSame($messages[2]->message, 'Schema errors for block.block.aggregator with the following errors: block.block.aggregator:settings.block_count missing schema, block.block.aggregator:settings.feed missing schema, 0 [settings] 'block_count' is not a supported key., 1 [settings] 'feed' is not a supported key.');
-    $this->assertSame($messages[3]->message, 'Schema errors for block.block.book with the following errors: block.block.book:settings.block_mode missing schema, 0 [settings] 'block_mode' is not a supported key.');
+    $this->assertSame($messages[2]->message, 'Schema errors for block.block.aggregator with the following errors: block.block.aggregator:settings.block_count missing schema, block.block.aggregator:settings.feed missing schema, 0 [settings.block_count] 'block_count' is not a supported key., 1 [settings.feed] 'feed' is not a supported key.');
+    $this->assertSame($messages[3]->message, 'Schema errors for block.block.book with the following errors: block.block.book:settings.block_mode missing schema, 0 [settings.block_mode] 'block_mode' is not a supported key.');
   }
 
 }
diff --git a/core/modules/config/tests/src/Functional/SchemaConfigListenerWebTest.php b/core/modules/config/tests/src/Functional/SchemaConfigListenerWebTest.php
index 7701ff626880d98f3ac745b55fbf9b4a3b1d4681..4860f9e0a68ce13614b30e9227d062842c819d22 100644
--- a/core/modules/config/tests/src/Functional/SchemaConfigListenerWebTest.php
+++ b/core/modules/config/tests/src/Functional/SchemaConfigListenerWebTest.php
@@ -55,7 +55,7 @@ public function testConfigSchemaChecker() {
       $this->fail('Expected SchemaIncompleteException thrown');
     }
     catch (SchemaIncompleteException $e) {
-      $this->assertEquals("Schema errors for config_test.types with the following errors: config_test.types:array variable type is integer but applied schema class is Drupal\Core\Config\Schema\Sequence, config_test.types:foo missing schema, 0 [] 'foo' is not a supported key.", $e->getMessage());
+      $this->assertEquals("Schema errors for config_test.types with the following errors: config_test.types:array variable type is integer but applied schema class is Drupal\Core\Config\Schema\Sequence, config_test.types:foo missing schema, 0 [foo] 'foo' is not a supported key.", $e->getMessage());
     }
 
     // Test that the config event listener is working in the child site.
diff --git a/core/tests/Drupal/KernelTests/Config/TypedConfigTest.php b/core/tests/Drupal/KernelTests/Config/TypedConfigTest.php
index a2956ff5f892c80fe44243f7a859a69e806cc39d..f0792cc9aab532fb7a1872c5f04246353ba70ac5 100644
--- a/core/tests/Drupal/KernelTests/Config/TypedConfigTest.php
+++ b/core/tests/Drupal/KernelTests/Config/TypedConfigTest.php
@@ -185,9 +185,9 @@ public function testSimpleConfigValidation() {
     // 2 constraint violations triggered by the default validation constraint
     // for `type: mapping`
     // @see \Drupal\Core\Validation\Plugin\Validation\Constraint\ValidKeysConstraint
-    $this->assertSame('', $result->get(0)->getPropertyPath());
+    $this->assertSame('elephant', $result->get(0)->getPropertyPath());
     $this->assertEquals("'elephant' is not a supported key.", $result->get(0)->getMessage());
-    $this->assertSame('', $result->get(1)->getPropertyPath());
+    $this->assertSame('zebra', $result->get(1)->getPropertyPath());
     $this->assertEquals("'zebra' is not a supported key.", $result->get(1)->getMessage());
     // 1 additional constraint violation triggered by the custom
     // constraint for the `config_test.validation` type, which indirectly
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php
index a1cd756fa35d5b6c1a18664f50575a634e4cca0f..04ba751ab92cd32bad1a917c7b51683ce4bd3901 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigEntityValidationTestBase.php
@@ -183,7 +183,7 @@ public function providerConfigDependenciesValidation(): array {
           'fun_stuff' => ['star-trek.deep-space-nine'],
         ],
         [
-          'dependencies' => "'fun_stuff' is not a supported key.",
+          'dependencies.fun_stuff' => "'fun_stuff' is not a supported key.",
         ],
       ],
       'empty string in config dependencies' => [
diff --git a/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php b/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php
index fbda9ca86088625ef3b4008f2256d5cf4ef44717..0191f7d818e9637e83b048969592cd1244c9c7da 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/SchemaCheckTraitTest.php
@@ -63,8 +63,8 @@ public function testTrait() {
       'config_test.types:boolean' => 'non-scalar value but not defined as an array (such as mapping or sequence)',
       // Validation constraints violations.
       // @see \Drupal\Core\TypedData\TypedDataInterface::validate()
-      '0' => "[] 'new_key' is not a supported key.",
-      '1' => "[] 'new_array' is not a supported key.",
+      '0' => "[new_key] 'new_key' is not a supported key.",
+      '1' => "[new_array] 'new_array' is not a supported key.",
       '2' => '[boolean] This value should be of the correct primitive type.',
     ];
     $this->assertEquals($expected, $ret);
diff --git a/core/tests/Drupal/KernelTests/Core/Config/SimpleConfigValidationTest.php b/core/tests/Drupal/KernelTests/Core/Config/SimpleConfigValidationTest.php
index 633841a7ee9d35e0d4a4482d23cc56fd46f990a8..5b333b19ffb82b80a62c0c8fc9e19a8f2ed835c7 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/SimpleConfigValidationTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/SimpleConfigValidationTest.php
@@ -68,7 +68,7 @@ public function testDefaultConfigHashValidation(): void {
     $violations = $typed_config_manager->createFromNameAndData($config->getName(), $data)
       ->validate();
     $this->assertCount(1, $violations);
-    $this->assertSame('_core', $violations[0]->getPropertyPath());
+    $this->assertSame('_core.invalid_key', $violations[0]->getPropertyPath());
     $this->assertSame("'invalid_key' is not a supported key.", (string) $violations[0]->getMessage());
   }
 
diff --git a/core/tests/Drupal/Tests/Traits/Core/Config/SchemaConfigListenerTestTrait.php b/core/tests/Drupal/Tests/Traits/Core/Config/SchemaConfigListenerTestTrait.php
index 8f792fb5954c5d67262b4811d73da4a91534c498..62552d4dc2d1fd63744e5a42e04aa9c5226810de 100644
--- a/core/tests/Drupal/Tests/Traits/Core/Config/SchemaConfigListenerTestTrait.php
+++ b/core/tests/Drupal/Tests/Traits/Core/Config/SchemaConfigListenerTestTrait.php
@@ -55,7 +55,7 @@ public function testConfigSchemaChecker() {
       $this->fail($message);
     }
     catch (SchemaIncompleteException $e) {
-      $this->assertEquals("Schema errors for config_test.types with the following errors: config_test.types:array variable type is integer but applied schema class is Drupal\Core\Config\Schema\Sequence, config_test.types:foo missing schema, 0 [] 'foo' is not a supported key.", $e->getMessage());
+      $this->assertEquals("Schema errors for config_test.types with the following errors: config_test.types:array variable type is integer but applied schema class is Drupal\Core\Config\Schema\Sequence, config_test.types:foo missing schema, 0 [foo] 'foo' is not a supported key.", $e->getMessage());
     }
 
   }