Issue when trying to get shortest path from node A to node B

I'm trying to get the shortest path between 2 nodes, given some criteria.

The starting node has tag SDV-1223056-1.
The ending node has tag LV-1223018.

The Cypher query that I am using is as follows:

SQL
MATCH (start:object {tag: "SDV-1223056-1"}), (end:object {tag: "LV-1223018"}),
path = shortestPath((start)-[*]->(end))
WITH path,
[node IN nodes(path) WHERE
(node.tag = "XXX")
OR
node.type CONTAINS "Offline"
OR
(node.tag <> "" AND node.tag IS NOT NULL AND
(
node.tag CONTAINS "-F-" OR
node.tag CONTAINS "-DA-" OR
node.tag CONTAINS "-DF-" OR
node.tag CONTAINS "-DFC-" OR
node.tag CONTAINS "-CNI-"
)
)
] AS filteredNodes
WHERE SIZE(filteredNodes) = 0
UNWIND nodes(path) AS node
RETURN distinct node.object_id, node.tag AS tag, node.type AS type, node.drawing AS drawing

It returns no records.

However, if I select an intermediate node (tag: SDV-1223012), then it is possible to find a path from the starting node to the intermediate node and it is also possible to find a path from the intermediate node to the ending node.

Do you know what could be leading to this problem?

Thank you!

Version: 5.11.0