When you want to call entities outside the current name space (vendor/bundle1/entity), you need to reference. 2 Solutions :
namespace vendor\bundle2\Controller;
use vendor\bundle1\Entity\MyEntity;
Or
directly set the full path in the name of your entity
public function indexAction() {
...
$entity = new vendor\bundle1\Entity\MyEntity();
....
}
PS : I don't know if it s related but i remember issues with entity subdirectory with Doctrine