Does this condition imply isomorphism?

Here is a counterexample for a field of positive characteristic.

Let $k = F_2$ - a field that consists of two elements. Let $X = k^3$ and $Y = k$ - two vector spaces.

Consider $\alpha_i:X \rightarrow Y$ be a projection on $i$-th coordinate, i.e. $\alpha_i(x_1,x_2,x_3) = x_i$ for $i = 1,2,3$ and $(x_1,x_2,x_3) \in k^3$. Also let $\beta_i:Y \rightarrow X$ be an embedding into $i$-th coordinate, i.e. $\beta_1(x) = (x,0,0)$, $\beta_2(x) = (0,x,0)$ and $\beta_3(x) = (0,0,x)$ for $x \in k$. Observe that $\alpha_i \circ \beta_i = id_Y$ for all $i = 1,2,3$ and $\sum\limits_{i = 1}^{3}\beta_i \circ \alpha_i = id_X$ (it works for arbitrary field $k$). Now what is so special about $k = F_2$: $$\sum\limits_{i = 1}^{3} \alpha_i \circ \beta_i = \sum\limits_{i = 1}^{3} id_Y = id_Y.$$ Therefore $$(id_X,id_Y) = \xi\left(\sum\limits_{i = 1}^3 \alpha_i \otimes \beta_i\right)$$

Note that analogous construction can be done for arbitrary field $k$ of characteristic $n > 0$: we take $X = k^{n+1}$ and $Y = k$. Maybe the situation is different for characteristic $0$ (I wasn't able to construct an example in this case).


When $\operatorname{char} k=0,$ there are no counterexamples in the category of vector spaces over $k.$ If $X$ and $Y$ are both finite dimensional, then $(g\circ f, f\circ g)$ lands in the vector space $\{(\alpha,\beta)\mid \operatorname{tr} \alpha=\operatorname{tr} \beta\},$ which only includes $(\mathrm{id}_X,\mathrm{id}_Y)$ if $\dim X=\dim Y.$ If one of them is infinite-dimensional, say $\dim Y=\kappa>\dim X$ wlog, then $f\circ g$ lives in the vector space of maps $Y\to Y$ of rank less than $\kappa,$ which does not include $\mathrm{id}_Y.$

However, there are counterexamples in the category of left modules over the first Weyl algebra $R=k[A,B]/(AB-BA-1).$ Take $X=R$ and $Y=R^2.$ Let $M$ be your map, defined on elementary tensors by $M(f\otimes g)=(g\circ f, f\circ g).$ For any $r,s\in R,$ consider the maps $$f_1(x)=(xs,0)$$ $$f_2(x)=(0,xs)$$ $$g_1(x,y)=xr$$ $$g_2(x,y)=yr$$ Then $M(f_1\otimes g_1+f_2\otimes g_2)=(g_1\circ f_1+g_2\circ f_2,f_1\circ g_1+f_2\circ g_2)=(2sr,rs)$ is in the image of $M,$ where I am using the right $R$-module structure on $\operatorname{hom}(X,X)$ and $\operatorname{hom}(Y,Y)$ to allow elements of $R$ to denote right multiplication maps (e.g. $2sr$ means the map $x\mapsto 2xsr$).

Setting $r=1$ and $s=1+AB$ shows that $(2(1+AB),1+AB)$ is in the image of $M.$

Setting $r=B$ and $s=A$ shows that $(2AB,BA)$ is in the image of $M.$

Subtracting and dividing by two shows that $\tfrac12(2(1+AB)-2AB,1+AB-BA)=(1,1)$ is in the image of $M.$ But $R$ is left Noetherian and hence has invariant basis number, which ensures $X$ is not isomorphic to $Y$ as a left $R$-module.