What does the computed code do for a computed field in content type
The code fetches the id of the node_project. 

For example if the node's project field is set 'Foo' it will get the id of that row where it was saved. As its not clear from where $node comes whether its current loaded node or any other node. But it seems that in computed field you are storing the ID of the project

What I think is causing the problem is if project names are FOO and FOO_BAR the query will result both the ids which can cause to store incorrect ids. 

You can simply remove the like operator and add equality.